CN103854649B - A kind of frame losing compensation method of transform domain and device - Google Patents

A kind of frame losing compensation method of transform domain and device Download PDF

Info

Publication number
CN103854649B
CN103854649B CN201210498677.3A CN201210498677A CN103854649B CN 103854649 B CN103854649 B CN 103854649B CN 201210498677 A CN201210498677 A CN 201210498677A CN 103854649 B CN103854649 B CN 103854649B
Authority
CN
China
Prior art keywords
frame
lost frames
current lost
signal
pitch period
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201210498677.3A
Other languages
Chinese (zh)
Other versions
CN103854649A (en
Inventor
关旭
袁浩
刘末飞
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
ZTE Corp
Original Assignee
ZTE Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by ZTE Corp filed Critical ZTE Corp
Priority to CN201210498677.3A priority Critical patent/CN103854649B/en
Publication of CN103854649A publication Critical patent/CN103854649A/en
Application granted granted Critical
Publication of CN103854649B publication Critical patent/CN103854649B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

A kind of frame losing compensation method the invention discloses transform domain and device, including:Using the former frame of current lost frames or the frequency coefficient of preceding several frames, the frequency coefficient of current lost frames is calculated, time domain frequency domain is carried out and converts to obtain initial compensation signal;Waveform adjustment is carried out, signal is compensated, compared with low computational complexity, to have reached better compensation effect.Or all or part of frequency point to current lost frames, utilize the phase and amplitude of the corresponding frequency point of preceding several frames, extrapolation obtains the phase and amplitude of the corresponding frequency point of current lost frames, and then obtain the frequency coefficient of corresponding frequency point, it is compensated signal by time domain frequency domain transformation, substantially increases the compensation effect of tone frame.Better compensation effect can be reached by judging that the algorithms selection above method compensates current lost frames.Speech signal frame and music signal frame differenceization are handled, good compensation effect can be obtained under various scenes.By Gain tuning, energy is steadily compensated, reduces compensation noise.

Description

A kind of frame losing compensation method of transform domain and device
Technical field
The present invention relates to the frame losing compensation method of voice frequency codec domain more particularly to a kind of transform domain and devices.
Background technology
In network communications, group technology applies very extensive, the data such as various forms of information such as voice or audio By using group technology in transmission over networks, such as VoIP (networking telephone) after coding.Since information transmitting terminal sends capacity Limitation, or grouping information frame does not reach rx-side buffering area within specified delay time or network congestion blocks etc. makes The loss of framing information causes the drastically decline of decoding end synthesis sound quality, it is therefore desirable to using compensation technique to the number of lost frames According to compensating.Frame losing compensation technique is exactly a kind of this technology declined due to sound quality caused by frame losing of mitigation.
Relevant transform domain voice frequency frame losing compensation method is simply using the transform-domain signals for repeating former frame the most Or use mute substitution method.Although this method realizes and does not postpone that compensation effect is general simple;Others are mended It repays mode such as GAPES (gap data amplitude phase estimation technique) needs and MDCT coefficients is first converted to DSTFT (Discrete Short Time Fu In leaf transformation) coefficient compensates again, this method computational complexity is high, and consumption memory is more;Another method uses shaped noise Insertion technology carries out voice frequency frame losing compensation, and this method is preferable to the compensation effect of noise-like signal, to harmonic wave audio signal Compensation effect is very poor.
In conclusion when relevant transform domain frame losing compensation technique majority effect unobvious, computational complexity height and delay Between it is long or poor to certain signal compensation effects.
Invention content
A kind of frame losing compensation method the technical problem to be solved in the present invention is to provide transform domain and device, can be with relatively low Computational complexity, realize no-delay, better compensation effect.
In order to solve the above technical problems, a kind of frame losing compensation method of transform domain of the present invention, the method includes:
Using the former frame of current lost frames or the frequency coefficient of preceding several frames, the frequency coefficient of current lost frames is calculated, Frequency-time-domain-transformation is carried out to the frequency coefficient for the current lost frames being calculated, obtains the initial compensation letter of current lost frames Number;
Waveform adjustment is carried out to the initial compensation signal, obtains the thermal compensation signal of current lost frames.
Further, waveform adjustment is carried out to the initial compensation signal, obtains the thermal compensation signal of current lost frames, wrapped It includes:
Pitch period estimation is carried out to current lost frames, judges that the pitch period value that pitch period is estimated whether may be used With if pitch period value is unavailable, using the initial compensation signal of current lost frames as the thermal compensation signal of current lost frames; If pitch period value is available, waveform tune is carried out to initial compensation signal using the time-domain signal of the former frame of current lost frames It is whole.
Further, pitch period estimation is carried out to current lost frames, including:
The time-domain signal that frame is properly received to the last one before current lost frames carries out pitch search, is currently lost The last one before losing frame is properly received the pitch period value of frame and maximum normalized autocorrelation value, the pitch period that will be obtained It is worth the pitch period value as current lost frames.
Further, further include:
Before the time-domain signal for being properly received frame to the last one before current lost frames carries out pitch search, to working as The last one time-domain signal for being properly received frame before preceding lost frames carries out low-pass filtering or down-sampled processing, to low-pass filtering Or the last one time-domain signal for being properly received frame before down-sampled treated current lost frames carries out pitch search.
Further, pitch period estimation is carried out to current lost frames, including:
The last one before calculating current lost frames is properly received the pitch period value of frame, the fundamental tone that will be calculated Pitch period value of the periodic quantity as current lost frames, calculated pitch period value calculate current lost frames most Big normalized autocorrelation value.
Further, judge whether the pitch period value that pitch period is estimated can be used, including:
Judge whether to meet any one in following condition, if meeting any one, then it is assumed that pitch period value is not It can use, including:
The zero-crossing rate of the initial compensation signal of (1) first lost frames is more than first threshold Z1, wherein Z1> 0;
(2) ratio of low frequency energy and whole frame energy that the last one before current lost frames is properly received frame is less than the Two threshold value ER1, wherein ER1> 0;
(3) the last one spectrum for being properly received frame before current lost frames, which tilts, is less than third threshold value TILT, wherein 0 < TILT < 1;
(4) zero-crossing rate of the last one rear field for being properly received frame before current lost frames is more than the zero passage of preceding field Rate several times.
Further, further include:
When judging to be unsatisfactory for any one in the condition (1)~condition (4), fundamental tone week is carried out according to following principle The whether available judgement of time value:
(a) when current lost frames are located at mute section, it is believed that pitch period value is unavailable;
(b) it is not located at mute section in current lost frames, and the maximum normalized autocorrelation value is more than the 4th threshold value R2When, Think that pitch period value is available, wherein 0 < R2< 1;
(c) principle (a) and principle (b) are not being met, and the last one before current lost frames is properly received the mistake of frame Zero rate is more than the 5th threshold value Z3, it is believed that pitch period value is unavailable, wherein Z3> 0;
(d) principle (a), (b) and (c) are not being met, and when at this time long logarithmic energy with before current lost frames most The difference that the latter is properly received the logarithmic energy of frame is more than the 6th threshold value E4When, it is believed that pitch period value is unavailable, wherein E4> 0;
(e) the last one before not meeting principle (a), (b), (c) and (d) and current lost frames is properly received frame The difference of logarithmic energy and logarithmic energy when at this time long is more than the 7th threshold value E5, and the maximum normalized autocorrelation value is more than 8th threshold value R3When, it is believed that pitch period value is available, wherein E50,0 < R of >3< 1;
(f) principle (a), (b), (c), (d) and when (e) are not being met, check before current lost frames the last one just The harmonic characterisitic of true receiving frame, when indicating that the value of harmonic characterisitic is less than the 9th threshold value H, it is believed that pitch period value is unavailable;When When indicating that the value of harmonic characterisitic is more than or equal to the 9th threshold value H, it is believed that pitch period value is available, wherein H < 1.
Further, waveform adjustment is carried out to initial compensation signal using the time-domain signal of the former frame of current lost frames, Including:
(i) it is L+L to establish length1Buffer area, L is frame length, L1> 0;
(ii) to the preceding L of buffer area1A unit is initialized, and the initialization includes:It is first in current lost frames When lost frames, the preceding L in allocating cache area1A unit is the preceding L of the initial compensation signal of current lost frames1The signal of length;Working as When preceding lost frames are not the first lost frames, the preceding L in allocating cache area1A unit is to the previous lost frames of current lost frames Initial compensation signal carries out the last L in buffer area used when waveform adjustment1The signal of length;
(iii) by the time-domain signal of the last one pitch period of the former frame of current lost frames together with the L in buffer area1 The signal of length together, in continuous repeat replication to buffer area, until fill up buffer area, when being replicated every time, if delayed The length for depositing existing signal in area is l, then this time replicating the l-L of signal replication to buffer area1To the position of l+T-1 On, wherein l > 0, T are pitch period, and the length for formation is L1Crossover region, the signal in crossover region is by two parts of signals Corresponding points addition obtains after adding window;
(iv) using the signal of the preceding L length in buffer area as the thermal compensation signal of current lost frames.
Further, further include:
Be properly received frame for first after current lost frames, the buffer area that structure length is L, according to step (ii) and The corresponding method of step (iii) fills up buffer area, by buffer area signal with to first after the current lost frames Be properly received the time-domain signal that frame decoding obtains and do adding window overlap-add, using obtained signal as the current lost frames after First time-domain signal for being properly received frame.
Further, waveform adjustment is carried out to initial compensation signal using the time-domain signal of the former frame of current lost frames, Including:
The buffer area that length is kL is built, L is frame length, k > 0;
To the preceding L of buffer area1A unit is initialized, wherein L1> 0, the initialization include:In current lost frames For the first lost frames when, the preceding L in allocating cache area1A unit is the preceding L of the initial compensation signal of current lost frames1The letter of length Number;When current lost frames are not or not first lost frames, the preceding L in allocating cache area1A unit is to the previous of current lost frames The initial compensation signal of lost frames carries out the last L in buffer area used when waveform adjustment1The signal of length;
By the time-domain signal of the last one pitch period of the former frame of current lost frames together with the L in buffer area1Length Signal together, in continuous repeat replication to buffer area, until fill up buffer area obtain length be kL time-domain signal, carrying out When replicating every time, if the length of existing signal is l in buffer area, this time replicate the l- of signal replication to buffer area L1Onto the position of l+T-1, wherein l > 0, T are pitch period, and the length for formation is L1Crossover region, the letter in crossover region Number by after two parts of signals adding window corresponding points addition obtain;
According to temporal order by the signal in the buffer area successively thermal compensation signal as current lost frames to q lost frames, When q is less than k, by buffer area q+1 frame signals with frame decoding be properly received to first after current lost frames obtain To time-domain signal do overlap-add, using obtained signal as first time domain for being properly received frame after current lost frames Signal;Alternatively,
According to temporal order by the preceding k-1 frame signals in buffer area successively as current lost frames to -1 lost frames of kth Thermal compensation signal, the kth frame signal in buffer area is used to do overlap-add with the initial compensation signal of kth lost frames, by what is obtained Thermal compensation signal of the signal as kth lost frames.
Further, further include:
After carrying out waveform adjustment to initial compensation signal, the signal after also adjusting waveform is multiplied by a gain, will multiply Using the signal after gain as the thermal compensation signal of current lost frames.
Further, when carrying out pitch search, speech signal frame and music signal frame are searched using different fundamental tones Rope bound.
Further, the last one before current lost frames be properly received frame be speech signal frame when, use is above-mentioned Method judges whether the pitch period value of current lost frames can be used.
Further, the last one before current lost frames be properly received frame be music signal frame when, use is following Method judges whether the pitch period value of current lost frames can be used, including:
If current lost frames are located at mute section, it is believed that pitch period value is unavailable;Alternatively,
If current lost frames are not located at mute section, maximum normalized autocorrelation value is more than the 19th threshold value R4, 0 < R4< 1, it is believed that pitch period value is available;Maximum normalized autocorrelation value is not more than R4, it is believed that pitch period value is unavailable.
Further, further include:After the thermal compensation signal for obtaining current lost frames, noise is added in thermal compensation signal.
Further, noise is added in thermal compensation signal, including:
By historical signal or initial compensation signal itself, obtained by a high-pass filter or spectral tilt filter Noise signal;
Estimate the noise gain value of current lost frames;
Obtained noise signal is multiplied by the noise gain value for the current lost frames that estimation obtains, after noise gain value will be multiplied Noise signal be added in the thermal compensation signal.
Further, further include:
After the thermal compensation signal for obtaining current lost frames, thermal compensation signal is also multiplied by scale factor.
Further, further include:
After the thermal compensation signal for obtaining current lost frames, according to the frame type of current lost frames, it is determined whether will be current The thermal compensation signal of lost frames is multiplied by scale factor, if it is determined that is multiplied by scale factor, then carries out described thermal compensation signal being multiplied by ruler Spend the operation of the factor.
Further, the frame losing compensation method of a kind of transform domain, the method includes:
The phase and amplitude of each frequency point of several frames before obtaining current lost frames;
It is linearly or nonlinearly extrapolated to the phase and amplitude of each frequency point of several frames before the current lost frames of acquisition, Obtain the phase and amplitude of each frequency point of current lost frames;
The frequency coefficient of each frequency point of current lost frames is obtained by the phase and amplitude of each frequency point of current lost frames, is led to It crosses frequency-time-domain-transformation and obtains the thermal compensation signal of current frame losing.
Further, the phase and amplitude of each frequency point of several frames before obtaining current lost frames;The current of acquisition is lost The phase and amplitude of each frequency point of several frames is linearly or nonlinearly extrapolated before losing frame, obtains each frequency point of current lost frames Phase and amplitude;The frequency domain system of each frequency point of current lost frames is obtained by the phase and amplitude of each frequency point of current lost frames Number, including:
When current lost frames are pth frame, to several frame time-domain signals before current lost frames, using improved discrete Sine transform MDST algorithms obtain the MDST coefficients of -3 frame of -2 frame of pth and pth, by the MDST of obtained -3 frame of -2 frame of pth and pth The complex signal of coefficient and the domains MDCT coefficients composition MDCT-MDST of -3 frame of -2 frame of pth and pth;
The phase linearity of -3 frame of -2 frame of pth and pth is extrapolated to obtain the plural number letter in the domains MDCT-MDST of each frequency point of pth frame Number phase;
The amplitude of each frequency point of pth frame is replaced using the amplitude of the corresponding frequency point of -2 frame of pth;
Infer the according to the phase of the complex signal in the domains MDCT-MDST of each frequency point of pth frame and the amplitude of each frequency point of pth frame MDCT coefficient of the p frames in each frequency point.
Further, further include:
According to the nearest c frame types for being properly received frame before current lost frames, choose whether to current lost frames Each frequency point utilizes the phase and amplitude before current lost frames at each frequency point of several frames, is linearly or nonlinearly extrapolated To the phase and amplitude of each frequency point of current lost frames.
Further, further include:
After the thermal compensation signal for obtaining current lost frames, thermal compensation signal is also multiplied by scale factor.
Further, further include:
After the thermal compensation signal for obtaining current lost frames, according to the frame type of current lost frames, it is determined whether will be current The thermal compensation signal of lost frames is multiplied by scale factor, if it is determined that is multiplied by scale factor, then carries out described thermal compensation signal being multiplied by ruler Spend the operation of the factor.
Further, the frame losing compensation method of a kind of transform domain, the method includes:
By judging that algorithm, selection compensate current lose using above-mentioned first method or above-mentioned second method Frame.
Further, by judging that algorithm, selection are mended using above-mentioned first method or above-mentioned second method Current lost frames are repaid, including:
Judgment frame type compensates current lose if current lost frames are tone frame using above-mentioned second method Frame;If current lost frames are non-pitch frame, current lost frames are compensated using above-mentioned first method.
Further, judgment frame type, including:
The preceding n frame type identifications for being properly received frame for obtaining current lost frames, if preceding n are properly received frame medium pitch The number of frame is more than the 11st threshold value n0, then it is assumed that current lost frames are tone frame;Otherwise it is assumed that current lost frames are non-pitch Frame, wherein 0≤n0≤ n, n >=1.
Further, including:
The spectrum flatness for calculating frame, judges whether the value for composing flatness is less than the tenth threshold k, then thinks this if it is less than K Frame is tone frame;Otherwise it is assumed that the frame is non-pitch frame, wherein 0≤K≤1.
Further, calculate compose flatness when, the frequency coefficient for calculating is original frequency after time-frequency domain variation Domain coefficient, or the frequency coefficient by original frequency domain coefficient after frequency spectrum shaping.
Further, judgment frame type, including:
Original frequency coefficient and the frequency by original frequency domain coefficient after frequency spectrum shaping after being changed using time-frequency domain Domain coefficient calculates separately the spectrum flatness of frame, obtains the corresponding two spectrums flatness of frame;
Whether it is less than the tenth threshold k according to the value for one of obtaining spectrum flatness, sets whether the frame is tone frame; Whether the value that flatness is composed according to obtained other in which is less than another threshold k ', reset whether the frame is tone frame;
Wherein, when the value for composing flatness is less than K, then frame is set as tone frame;Otherwise, frame is set as non-pitch frame, When the value of another spectrum flatness is less than K ', it is tone frame to reset the frame;Wherein, 0≤K≤1,0≤K '≤1.
Further, a kind of frame losing compensation device of transform domain, described device include:Frequency coefficient computing unit, transformation Unit and waveform adjustment unit, wherein:
The frequency coefficient computing unit, the frequency coefficient of former frame or preceding several frames for using current lost frames, Calculate the frequency coefficient of current lost frames;
The converter unit, the frequency coefficient of the current lost frames for the frequency coefficient computing unit to be calculated Frequency-time-domain-transformation is carried out, the initial compensation signal of current lost frames is obtained;
The waveform adjustment unit obtains current lost frames for carrying out waveform adjustment to the initial compensation signal Thermal compensation signal.
Further, the waveform adjustment unit is specifically used for carrying out pitch period estimation to current lost frames, judges base Whether the pitch period value that sound phase estimate obtains can be used, if pitch period value is unavailable, by the initial of current lost frames Thermal compensation signal of the thermal compensation signal as current lost frames;If pitch period value is available, the former frame of current lost frames is used Time-domain signal to initial compensation signal carry out waveform adjustment.
Further, the waveform adjustment unit includes pitch period subelement, wherein:
The pitch period subelement, the time-domain signal for being properly received frame to the last one before current lost frames Pitch search is carried out, the last one before obtaining current lost frames is properly received the pitch period value of frame and maximum normalizes certainly Correlation, using obtained pitch period value as the pitch period value of current lost frames;Alternatively,
The last one before calculating current lost frames is properly received the pitch period value of frame, the fundamental tone that will be calculated Pitch period value of the periodic quantity as current lost frames, calculated pitch period value calculate current lost frames most Big normalized autocorrelation value.
Further, the pitch period subelement is additionally operable to correctly connecing the last one before current lost frames Before the time-domain signal progress pitch search for receiving frame, the time-domain signal of frame is properly received to the last one before current lost frames Low-pass filtering or down-sampled processing are carried out, just to the last one before low-pass filtering or down-sampled treated current lost frames The time-domain signal of true receiving frame carries out pitch search.
Further, the waveform adjustment unit includes pitch period value judgment sub-unit, wherein:
The pitch period value judgment sub-unit meets any one in following condition for judging whether, if full Foot any one, then it is assumed that pitch period value is unavailable, including:
The zero-crossing rate of the initial compensation signal of (1) first lost frames is more than first threshold Z1, wherein Z1> 0;
(2) ratio of low frequency energy and whole frame energy that the last one before current lost frames is properly received frame is less than the Two threshold value ER1, wherein ER1> 0;
(3) the last one spectrum for being properly received frame before current lost frames, which tilts, is less than third threshold value TILT, wherein 0 < TILT < 1;
(4) zero-crossing rate of the last one rear field for being properly received frame before current lost frames is more than the zero passage of preceding field Rate several times.
Further, the pitch period value judgment sub-unit is additionally operable to judging to be unsatisfactory for the condition (1)~condition (4) when any one in, the whether available judgement of pitch period value is carried out according to following principle:
(a) when current lost frames are located at mute section, it is believed that pitch period value is unavailable;
(b) it is not located at mute section in current lost frames, and the maximum normalized autocorrelation value is more than the 4th threshold value R2When, Think that pitch period value is available, wherein 0 < R2< 1;
(c) principle (a) and principle (b) are not being met, and the last one before current lost frames is properly received the mistake of frame Zero rate is more than the 5th threshold value Z3, it is believed that pitch period value is unavailable, wherein Z3> 0;
(d) principle (a), (b) and (c) are not being met, and when at this time long logarithmic energy with before current lost frames most The difference that the latter is properly received the logarithmic energy of frame is more than the 6th threshold value E4When, it is believed that pitch period value is unavailable, wherein E4> 0;
(e) the last one before not meeting principle (a), (b), (c) and (d) and current lost frames is properly received frame The difference of logarithmic energy and logarithmic energy when at this time long is more than the 7th threshold value E5, and the maximum normalized autocorrelation value is more than 8th threshold value R3When, it is believed that pitch period value is available, wherein E50,0 < R of >3< 1;
(f) principle (a), (b), (c), (d) and when (e) are not being met, check before current lost frames the last one just The harmonic characterisitic of true receiving frame, when indicating that the value of harmonic characterisitic is less than the 9th threshold value H, it is believed that pitch period value is unavailable;When When indicating that the value of harmonic characterisitic is more than or equal to the 9th threshold value H, it is believed that pitch period value is available, wherein H < 1.
Further, the waveform adjustment unit includes adjustment subelement, wherein:
The adjustment subelement, it is L+L to establish length for (i)1Buffer area, L is frame length, L1> 0;
(ii) to the preceding L of buffer area1A unit is initialized, and the initialization includes:It is first in current lost frames When lost frames, the preceding L in allocating cache area1A unit is the preceding L of the initial compensation signal of current lost frames1The signal of length;Working as When preceding lost frames are not the first lost frames, the preceding L in allocating cache area1A unit is to the previous lost frames of current lost frames Initial compensation signal carries out the last L in buffer area used when waveform adjustment1The signal of length;
(iii) by the time-domain signal of the last one pitch period of the former frame of current lost frames together with the L in buffer area1 The signal of length together, in continuous repeat replication to buffer area, until fill up buffer area, when being replicated every time, if delayed The length for depositing existing signal in area is l, then this time replicating the l-L of signal replication to buffer area1To the position of l+T-1 On, wherein l > 0, T are pitch period, and the length for formation is L1Crossover region, the signal in crossover region is by two parts of signals Corresponding points addition obtains after adding window;
(iv) using the signal of the preceding L length in buffer area as the thermal compensation signal of current lost frames.
Further, the adjustment subelement is additionally operable to be properly received frame for first after current lost frames, structure Length is the buffer area of L, buffer area is filled up according to step (ii) and the corresponding method of step (iii), by the signal in buffer area Adding window overlap-add is done with the time-domain signal that frame decoding obtains is properly received to first after the current lost frames, will To signal as first time-domain signal for being properly received frame after the current lost frames.
Further, the waveform adjustment unit includes adjustment subelement, wherein:
The adjustment subelement, for building the buffer area that length is kL, L is frame length, k > 0;
To the preceding L of buffer area1A unit is initialized, wherein L1> 0, the initialization include:In current lost frames For the first lost frames when, the preceding L in allocating cache area1A unit is the preceding L of the initial compensation signal of current lost frames1The letter of length Number;When current lost frames are not or not first lost frames, the preceding L in allocating cache area1A unit is to the previous of current lost frames The initial compensation signal of lost frames carries out the last L in buffer area used when waveform adjustment1The signal of length;
By the time-domain signal of the last one pitch period of the former frame of current lost frames together with the L in buffer area1Length Signal together, in continuous repeat replication to buffer area, until fill up buffer area obtain length be kL time-domain signal, carrying out When replicating every time, if the length of existing signal is l in buffer area, this time replicate the l- of signal replication to buffer area L1Onto the position of l+T-1, wherein l > 0, T are pitch period, and the length for formation is L1Crossover region, the letter in crossover region Number by after two parts of signals adding window corresponding points addition obtain;
According to temporal order by the signal in the buffer area successively thermal compensation signal as current lost frames to q lost frames, When q is less than k, by buffer area q+1 frame signals with frame decoding be properly received to first after current lost frames obtain To time-domain signal do overlap-add, using obtained signal as first time domain for being properly received frame after current lost frames Signal;Alternatively,
According to temporal order by the preceding k-1 frame signals in buffer area successively as current lost frames to -1 lost frames of kth Thermal compensation signal, the kth frame signal in buffer area is used to do overlap-add with the initial compensation signal of kth lost frames, by what is obtained Thermal compensation signal of the signal as kth lost frames.
Further, the waveform adjustment unit further includes gain subelement, wherein:
The gain subelement is used for after carrying out waveform adjustment to initial compensation signal, the letter after also adjusting waveform Number it is multiplied by a gain, the signal after gain will be multiplied by as the thermal compensation signal of current lost frames.
Further, the pitch period subelement is when carrying out pitch search, for speech signal frame and music signal Frame uses different pitch search bounds.
Further, the last one of the pitch period value judgment sub-unit before current lost frames is properly received frame For speech signal frame when, judge whether the pitch period value of current lost frames can be used using the above method.
Further, the pitch period value judgment sub-unit, be additionally operable to before current lost frames the last one just When true receiving frame is music signal frame, judge whether the pitch period value of current lost frames can be used using following methods, including:
If current lost frames are located at mute section, it is believed that pitch period value is unavailable;Alternatively,
If current lost frames are not located at mute section, maximum normalized autocorrelation value is more than the 19th threshold value R4, 0 < R4< 1, it is believed that pitch period value is available;Maximum normalized autocorrelation value is not more than R4, it is believed that pitch period value is unavailable.
Further, the waveform adjustment unit further includes noise addition subelement, wherein:
The noise adds subelement, for after the thermal compensation signal for obtaining current lost frames, being added in thermal compensation signal Noise.
Further, the noise adds subelement, is specifically used for, by historical signal or initial compensation signal itself, passing through One high-pass filter or spectral tilt filter obtain noise signal;
Estimate the noise gain value of current lost frames;
Obtained noise signal is multiplied by the noise gain value for the current lost frames that estimation obtains, after noise gain value will be multiplied Noise signal be added in the thermal compensation signal.
Further, described device further includes scale factor unit, wherein:
The scale factor unit, after obtaining the thermal compensation signal of current lost frames in the waveform adjustment unit, Thermal compensation signal is multiplied by scale factor.
Further, the scale factor unit, specifically for obtaining current lost frames in the waveform adjustment unit After thermal compensation signal, according to the frame type of current lost frames, it is determined whether by the thermal compensation signal of current lost frames be multiplied by scale because Son, if it is determined that be multiplied by scale factor, then carry out the operation that thermal compensation signal is multiplied by scale factor.
Further, a kind of frame losing compensation device of transform domain, described device include:First phase amplitude acquiring unit, Second phase amplitude acquiring unit and thermal compensation signal acquiring unit, wherein:
The first phase amplitude acquiring unit, for the phase of each frequency point of several frames before obtaining current lost frames and Amplitude;
The second phase amplitude acquiring unit, for the phase to each frequency point of several frames before the current lost frames of acquisition Position and amplitude are linearly or nonlinearly extrapolated, and the phase and amplitude of each frequency point of current lost frames is obtained;
The thermal compensation signal acquiring unit, the phase and amplitude for each frequency point by current lost frames are currently lost The frequency coefficient for losing each frequency point of frame, the thermal compensation signal of current frame losing is obtained by frequency-time-domain-transformation.
Further, the first phase amplitude acquiring unit is specifically used for when current lost frames are pth frame, to working as Several frame time-domain signals before preceding lost frames obtain -2 frame of pth and pth -3 using improved discrete sine transform MDST algorithms The MDST coefficients of frame, by the MDCT coefficient sets of the MDST coefficients and -3 frame of -2 frame of pth and pth of obtained -3 frame of -2 frame of pth and pth At the complex signal in the domains MDCT-MDST;
The second phase amplitude acquiring unit, specifically for extrapolating to obtain the phase linearity of -3 frame of -2 frame of pth and pth The phase of the complex signal in the domains MDCT-MDST of each frequency point of pth frame;Replace pth frame each using the amplitude of the corresponding frequency point of -2 frame of pth The amplitude of frequency point;
The thermal compensation signal acquiring unit is specifically used for the complex signal in the domains MDCT-MDST according to each frequency point of pth frame Phase and the amplitude of each frequency point of pth frame infer pth frame each frequency point MDCT coefficients
Further, described device further includes frequency point selecting unit, wherein:
The frequency point selecting unit, for according to the nearest c frame types for being properly received frame before current lost frames, choosing The phase and amplitude whether utilized to each frequency points of current lost frames before current lost frames at each frequency point of several frames is selected, into Line or nonlinear extrapolation obtain the phase and amplitude of each frequency point of current lost frames.
Further, described device further includes scale factor unit, wherein:
The scale factor unit, for obtained in the thermal compensation signal acquiring unit current lost frames thermal compensation signal it Afterwards, thermal compensation signal is multiplied by scale factor.
Further, the scale factor unit, specifically for currently being lost in the thermal compensation signal acquiring unit After the thermal compensation signal of frame, according to the frame type of current lost frames, it is determined whether the thermal compensation signal of current lost frames is multiplied by ruler Spend the factor, if it is determined that be multiplied by scale factor, then carry out the operation that thermal compensation signal is multiplied by scale factor.
Further, a kind of frame losing compensation device of transform domain, described device include:Judging unit, wherein:
The judging unit, for by judging that algorithm, selection use the first above-mentioned device or above-mentioned second Kind device compensates current lost frames.
Further, the judging unit is specifically used for judgment frame type, if current lost frames are tone frame, makes Current lost frames are compensated with second above-mentioned of device;If current lost frames are non-pitch frame, the first above-mentioned is used Device compensates current lost frames.
Further, the judging unit, specifically for obtaining the preceding n frame types for being properly received frame of current lost frames Mark, if the preceding n numbers for being properly received frame medium pitch frame are more than the 11st threshold value n0, then it is assumed that current lost frames are tone Frame;Otherwise it is assumed that current lost frames are non-pitch frame, wherein 0≤n0≤ n, n >=1.
Further, the judging unit is specifically used for calculating the spectrum flatness of frame, judges whether the value for composing flatness is small In the tenth threshold k, then think that the frame is tone frame if it is less than K;Otherwise it is assumed that the frame is non-pitch frame, wherein 0≤K≤1.
Further, for the judging unit when calculating spectrum flatness, the frequency coefficient for calculating is that time-frequency domain becomes Original frequency coefficient after change, or the frequency coefficient by original frequency domain coefficient after frequency spectrum shaping.
Further, the judging unit is specifically used for using frequency coefficient original after time-frequency domain variation and incites somebody to action Frequency coefficient of the original frequency domain coefficient after frequency spectrum shaping calculates separately the spectrum flatness of frame, and it is flat to obtain corresponding two spectrums of frame Smooth degree;
Whether it is less than the tenth threshold k according to the value for one of obtaining spectrum flatness, sets whether the frame is tone frame; Whether the value that flatness is composed according to obtained other in which is less than another threshold k ', reset whether the frame is tone frame;
Wherein, when the value for composing flatness is less than K, then frame is set as tone frame;Otherwise, frame is set as non-pitch frame, When the value of another spectrum flatness is less than K ', it is tone frame to reset the frame;Wherein, 0≤K≤1,0≤K '≤1.
In conclusion the present invention calculates current lose using the former frame of current lost frames or the frequency coefficient of preceding several frames The frequency coefficient of frame carries out frequency-time-domain-transformation to the frequency coefficient for the current lost frames being calculated, obtains current lost frames Initial compensation signal;Waveform adjustment is carried out to initial compensation signal, obtains the thermal compensation signal of current lost frames, it can be with relatively low Computational complexity, reaches the frame losing compensation effect of better voice frequency signal, and substantially reduces delay time.
Description of the drawings
Fig. 1 is in the present invention to the schematic diagram of lost frames name definition;
Fig. 2 (A) is the flow chart of the frame losing compensation method of the transform domain of the embodiment of the present invention 1;
Fig. 2 (B) is the schematic diagram of the method for the frequency coefficient that current lost frames are calculated in the embodiment of the present invention 1;
Fig. 3 is the flow chart for carrying out Waveform regulating method in the embodiment of the present invention 1 to initial compensation signal;
Fig. 4 is the schematic diagram of Waveform regulating method in the embodiment of the present invention 1;
The flow chart of the frequency coefficient method of each frequency point of current lost frames is obtained in Fig. 5 embodiment of the present invention 2;
Fig. 6 is the flow chart for judging algorithm in the embodiment of the present invention 3;
Fig. 7 is the schematic diagram of pitch search in the embodiment of the present invention 4;
Fig. 8 is the whether available schematic diagram of pitch period for the current frame losing for judging that search obtains in the embodiment of the present invention 4;
Fig. 9 is the flow chart of the embodiment of the present invention 5;
Figure 10 is a kind of Organization Chart of the frame losing compensation device of transform domain of embodiment of the present invention;
Figure 11 is the Organization Chart of the waveform adjustment unit in the device of embodiment of the present invention;
Figure 12 is the Organization Chart of the frame losing compensation device of another transform domain of embodiment of the present invention.
Specific implementation mode
To make the objectives, technical solutions, and advantages of the present invention clearer, below in conjunction with attached drawing to the present invention's Embodiment is described in detail.It should be noted that in the absence of conflict, in the embodiment and embodiment in the application Feature mutually can be combined arbitrarily.
It is referred to as the first lost frames as shown in Figure 1, following closely and being properly received first lost frames of frame, follows the first lost frames closely Continuous second lost frames be referred to as the second lost frames, and so on.
Embodiment 1:
As shown in Fig. 2 (A), the frame losing compensation method of the transform domain of present embodiment, including:
Step 101:Using the former frame of current lost frames or the frequency coefficient of several frames, current lost frames are calculated Frequency coefficient carries out frequency-time-domain-transformation to the frequency coefficient being calculated and obtains the initial compensation signal of current lost frames;
Several frames are two frames or more than two frames.
Step 102:Waveform adjustment is carried out to initial compensation signal, obtains the thermal compensation signal of current lost frames;
Step 101 and step 102 are specifically described respectively below in conjunction with the accompanying drawings.
As shown in Fig. 2 (B), the specific method that the frequency coefficient of current lost frames is calculated includes:
Step 1:The frequency coefficient of the former frame of current lost frames is made into appropriate decaying, then as current lost frames Frequency coefficient, i.e.,:
When current lost frames are pth frame,
cp(m)=α * cp-1(m), m=0 ..., M-1;
Wherein cp(m) indicating that frequency coefficient of the pth frame frequency point m at, M are that frequency point is total, α is attenuation coefficient, 0≤α≤ 1, α can use fixed value for each lost frames, can also be to the first lost frames, the second lost frames ..., kth lost frames etc. Using different values.
The weighted average of the frequency coefficient of several frames before current lost frames can also be made to appropriate decaying, be then used as current The frequency coefficient of lost frames.
Step 2:Preferably, the frequency coefficient of each frequency point of current lost frames obtained above can also be multiplied by respectively One random mark obtains the frequency coefficient of each frequency point of new current lost frames, i.e.,:
cp(m)=sgn (m) * cp(m), m=0 ..., M-1,
Wherein, sgn (m) is the random mark at frequency point m.
As shown in figure 3, the method for carrying out waveform adjustment to initial compensation signal in step 102 includes:
102a:Pitch period estimation is carried out to current lost frames, the method for specific pitch period estimation is as follows:
First, the time-domain signal for being properly received frame to the last one before current lost frames using autocorrelation method is carried out Pitch search, the last one before obtaining current lost frames are properly received the pitch period value of frame and maximum normalized autocorrelation Value, using obtained pitch period value as the pitch period value of current lost frames;
Find t ∈ [Tmin, Tmax], 0 < Tmin< Tmax< L makeReach maximum Value, the maximum value are maximum normalized autocorrelation value, and t at this time is pitch period value, wherein Tmin, TmaxRespectively fundamental tone The lower and upper limit of search, L are frame length, and s (i), i=0 ..., L-1 are the time-domain signal for waiting for pitch search;
Particularly, during carrying out pitch period estimation, the last one before current lost frames is correctly being connect Before the time-domain signal progress pitch search for receiving frame, following handle can also be first carried out:First to last before current lost frames One time-domain signal for being properly received frame does low-pass filtering or down-sampled processing, then use low-pass filtering or it is down-sampled after when Domain signal replaces the last one time-domain signal for being properly received frame before original current lost frames to carry out pitch period estimation.It is low Pass filter or down-sampled processing can reduce the complexity of influence or reduction pitch search of the signal high fdrequency component to pitch search.
The last one before other methods can also being used to calculate current lost frames in this step is properly received frame Pitch period value recycles the pitch period value to calculate maximum normalized autocorrelation value, such as:
Find t ∈ [Tmin, Tmax], 0 < Tmin< Tmax< L makeReach maximum value, t at this time is For pitch period value T, maximum normalized autocorrelation value is
102b:Whether the pitch period searched in judgment step 102a can be used;
Although having estimated the pitch period value of current lost frames in step 102a, which may not can be used, and adopt With following condition judgment, whether the pitch period value can be used:
I. any one met in following condition then thinks that the pitch period value is unavailable:
The zero-crossing rate of the initial compensation signal of (1) first lost frames is more than first threshold Z1, wherein Z1> 0;
When current lost frames are first lost frames after being properly received frame, the first lost frames in condition (1) are Current lost frames;When current lost frames are not first lost frames after being properly received frame, the first lost frames in condition (1) To follow first lost frames that the last one before current lost frames is properly received frame closely.
(2) ratio of low frequency energy and whole frame energy that the last one before current lost frames is properly received frame is less than the Two threshold value ER1, wherein ER1> 0;
Wherein, the ratio of low frequency energy and whole frame energy may be defined as:
(3) the last one spectrum for being properly received frame before current lost frames, which tilts, is less than third threshold value TILT, wherein 0 < TILT < 1;
Wherein, spectrum is tilted and can be defined as:
(4) zero-crossing rate of the last one rear field for being properly received frame before current lost frames is more than the zero passage of preceding field Rate several times.
When ii above-mentioned conditions are all unsatisfactory for, then make the following judgment:
(a) if current lost frames are located at mute section, it is believed that the pitch period value is unavailable;
Can use be not limited to judge with the following method whether current lost frames are located at mute section:
If the logarithmic energy that the last one before current lost frames is properly received frame is less than 12 threshold value E1, or simultaneously Meet following two conditions:
(1) the maximum normalized autocorrelation value in step 102 is less than 13 threshold value R1, wherein 0 < R1< 1;
(2) logarithmic energy and the last one before current lost frames are properly received the logarithmic energy of frame when at this time long Difference is more than 14 threshold value E2When;
Then think that current lost frames are located at mute section.
Wherein logarithmic energy is defined as:
Logarithmic energy is defined as when long:By an initial value e0Start, e0>=0, it is carried out when each frame meets following conditions Update:emean=a*emean+(1-a)*e。
Update condition is:The logarithmic energy e of the frame is more than 15 threshold value E3And the zero-crossing rate of the frame is less than 16 threshold values Z2
If (b) lost frames are not located at mute section, and the maximum normalized autocorrelation value in step 102 is more than the 4th threshold value R2When, wherein 0 < R2< 1, it is believed that the pitch period value is available;
If (c) above-mentioned two condition is all unsatisfactory for, and the last one before current lost frames is properly received the mistake of frame Zero rate is more than the 5th threshold value Z3, wherein Z3> 0, it is believed that the pitch period value is unavailable;
(d) if above three condition is all unsatisfactory for, and when at this time long logarithmic energy with before current lost frames most The difference that the latter is properly received the logarithmic energy of frame is more than the 6th threshold value E4When, wherein E4> 0, it is believed that the pitch period value can not With;
If (e) aforementioned four condition is all unsatisfactory for, and the last one before current lost frames is properly received pair of frame Number energy and the difference of logarithmic energy when at this time long are more than the 7th threshold value E5And the maximum normalized autocorrelation value in step 102 More than the 8th threshold value R3When, it is believed that the pitch period value is available, wherein E50,0 < R of >3< 1;
If (f) above-mentioned five conditions are all unsatisfactory for, the last one before checking current lost frames is properly received frame Harmonic characterisitic, when indicate harmonic characterisitic value harm be less than the 9th threshold value H when, then it is assumed that the pitch period value is unavailable;It is no Then think that the pitch period value is available, wherein H < 1;
Wherein,h1For fundamental frequency frequency point, hi, i=2 ... l h1I subharmonic frequency points, c (hi) For frequency point hiCorresponding frequency coefficient.Since there are fixed quantitative relation, h with gene frequency for pitch period valuei, i= 1 ... the value of l can be obtained by the pitch period value obtained in step 102, work as hiWhen not being integer, the side of rounding may be used Method uses and hiNeighbouring one or several integer frequency points participate in the calculating of harm.
102c:If pitch period value is unavailable, directly using the initial compensation signal of current lost frames as currently losing Lose the thermal compensation signal of frame;If pitch period value is available, 102d is thened follow the steps;
102d:Waveform adjustment is carried out to initial compensation signal using the time-domain signal of the former frame of current lost frames;
As shown in figure 4, the method for adjustment includes:
(i) it is to obtain the time-domain signal after current lost frames waveform adjustment, it is L+L to initially set up a length1Caching Area, L are frame length, L1> 0;
(ii) and then to the preceding L of buffer area1A unit is initialized:If current lost frames are the first lost frames, The preceding L of buffer area1A unit is initially the preceding L of current lost frames initial compensation signal1The data of length;If current lost frames When not being the first lost frames, the preceding L of buffer area1A unit is initially does waveform adjustment to the previous lost frames of current lost frames The last L of Shi Suoyong buffer areas1The data of length;Data with existing length is L in buffer area after initialization1
(iii) by the time-domain signal of the last one pitch period of the time-domain signal of the former frame of current lost frames together with slow Deposit the L in area1The signal of length together, on the position specified in continuous repeat replication to buffer area, until fill up buffer area.Institute Stating the position specified in buffer area refers to:If existing data length is l in present buffer area, this time replicate data Copy to the l-L of buffer area1Onto the position of l+T-1, the data with existing length after duplication in buffer area becomes l+T, wherein l > 0, T is pitch period.When duplication, due to l-L in buffer area1Existing data on to the position of l-1 are long so as to form one Degree is L1Crossover region, the signal in crossover region obtains by corresponding points addition after two parts of signals adding window;
(iv) using the data of the preceding L length of the signal in buffer area as the thermal compensation signal of current lost frames.
Preferably, time domain waveform is smooth after being compensated for guarantee, and first can also be encountered after lost frames and is correctly connect When receiving frame, the buffer area that a length is L is still built, then the method for above-mentioned (ii) and (iii) is used to fill up buffer area, is delayed The signal for depositing area is used to do adding window overlap-add with the practical obtained time-domain signal that decodes of the frame, that is, is fade-in and gradually goes out processing, will locate Time-domain signal of the signal as the frame after reason.
In this step, it direct construction length can also be the buffer area of kL when encountering the first lost frames, then use The method of above-mentioned (ii) and (iii) fill up buffer area to directly obtain the time-domain signal that length is kL, k > 0.Due to k be It encounters and sets when the first lost frames, and the number of actual continuous frame losing is likely less than or is more than or equal to k.When actually connecting When the number q of continuous frame losing is less than k, the signal of buffer area will become the first lost frames successively according to temporal order, and second loses The thermal compensation signal of frame ..., q lost frames, the q+1 frame signals in buffer area with first after lost frames for being properly received Frame is practical to be decoded obtained time-domain signal and is fade-in gradually to go out to handle;When the number q of practical continuous frame losing is more than or equal to k, caching Preceding k-1 frame signals in area become the first lost frames successively according to temporal order, -1 lost frames of the second lost frames ..., kth Thermal compensation signal;Kth frame signal in buffer area, which is used to be fade-in with the initial compensation signal of kth lost frames, gradually goes out processing, will locate The thermal compensation signal of signal after reason as kth lost frames;Waveform adjustment is not done to the lost frames after kth lost frames.
Preferably, the signal after can also adjusting waveform is multiplied by the benefit using the signal after a gain as lost frames Repay signal.Identical yield value can be used to each data point of lost frames, each data point of lost frames can also be used Different yield values.
The Waveform regulating method of the 102d can also include:The process of appropriate noise is added in thermal compensation signal, specifically The method for adding noise is as follows:
By the signal before initial compensation signal, i.e. historical signal or initial compensation signal itself, filtered by a high pass Wave device or spectral tilt filter obtain noise signal;Estimate the noise gain value of current lost frames;Noise signal is multiplied by It is added with thermal compensation signal to obtain new thermal compensation signal after noise gain value.Wherein it is possible to use phase to each data point of lost frames Same noise gain value can also use different noise gain values for each data point of lost frames.
In embodiment 1 current lost frames are calculated using the frequency coefficient of the former frame of current lost frames or preceding several frames Frequency coefficient carries out frequency-time-domain-transformation to the frequency coefficient for the current lost frames being calculated, obtains the first of current lost frames Beginning thermal compensation signal;Waveform adjustment is carried out to initial compensation signal, obtains the thermal compensation signal of current lost frames, it can be with relatively low operation Complexity reaches better frame losing compensation effect, and without additional delay.
Embodiment 2:
Step 201:The phase and amplitude of several each frequency points of frame before obtaining current lost frames, before current lost frames The phase and amplitude of several each frequency points of frame, linearly or nonlinearly extrapolation obtain the phase and amplitude of each frequency point of current lost frames, lead to The phase and amplitude for crossing each frequency point of current lost frames obtains the frequency coefficient of each frequency point of current lost frames;
Step 202:The thermal compensation signal of current frame losing is obtained by frequency-time-domain-transformation.
As Fig. 5 if the frequency domain representation of each information frame is the domains MDCT in codec, needs to make in step 201 The complex signal in the domains MDCT-MDST of several frames before constructing current lost frames with MDST (improved discrete sine transform), The method of step 201 specifically includes:
Step A:When pth frame loss, to several frame time-domain signals before current lost frames, obtained using MDST algorithms The MDST coefficients s of -3 frame of -2 frame of pth and pthp-2(m) and sp-3(m), the MDST coefficients of obtained -3 frame of -2 frame of pth and pth and The MDCT coefficients c of -3 frame of -2 frame of pth and pthp-2(m) and cp-3(m) complex signal in the domains composition MDCT-MDST:
vp-2(m)=cp-2(m)+jsp-2(m)(1)
vp-3(m)=cp-3(m)+jsp-3(m)(2)
Wherein j is imaginary symbols.
Step B:The phase and width of the domains the MDCT-MDST complex signal of each frequency point of pth frame are acquired according to following formula (3)-(8) Value:
Ap-2(m)=| vp-2(m)|(5)
Ap-3(m)=| vp-3(m)|(6)
WhereinA indicates phase and amplitude respectively.For example,For the estimated value of phase of the pth frame at frequency point m,For phase of -2 frame of pth at frequency point m,For phase of -3 frame of pth at frequency point m,It is that pth frame exists The estimated value of amplitude at frequency point m, Ap-2(m) it is amplitude of -2 frame of pth at frequency point m, remaining is similar.
Step C:Therefore compensate obtained pth frame is in the MDCT coefficients of frequency point m:
In step 201, several frames before current lost frames can also be utilized only to the part frequency point of current lost frames Phase and amplitude at the frequency point, linearly or nonlinearly extrapolation obtain the phase and amplitude of current these frequency points of lost frames, to Obtain the frequency coefficient of these frequency points;And to the frequency point other than these frequency points, the method in step 101 can be used to obtain frequency point Frequency coefficient;To obtain the frequency coefficient of each frequency point of current lost frames.It can also be by the frequency of obtained current lost frames Frequency-time-domain-transformation is carried out again after domain coefficient decaying.
Preferably, using embodiment 2 method compensate current lost frames when, can according to before current lost frames most The c close frame types for being properly received frame select, to whole frequency points of current lost frames, to utilize several frames before current lost frames Each frequency point phase and amplitude, linearly or nonlinearly extrapolation obtain the phase and amplitude of each frequency point of current lost frames;Either Aforesaid operations only are carried out to part frequency point.Such as:Only when first three of current lost frames is properly received all tone frame of frame, Just selection carries out aforesaid operations to whole frequency points of current lost frames.
In example 2, to whole frequency points, or frame is properly received according to the nearest c before current lost frames Frame type selects, to whole frequency points of current lost frames or only to part frequency point, to utilize the phase of several frames before current lost frames The phase and amplitude of frequency point is answered, linearly or nonlinearly extrapolation obtains the phase and amplitude of the corresponding frequency point of current lost frames, carries significantly The high compensation effect of tone frame.
Embodiment 3:
By judging that algorithm, selection compensate current lost frames using the method for embodiment 1 or embodiment 2.
As shown in fig. 6, the judgement algorithm includes:
Step 301:The spectrum flatness for calculating each frame, judges whether the value for composing flatness is less than the tenth threshold k, if small Then think that the frame is tone frame in K, setting frame type identification position is tone type (being, for example, 1);If being not less than K, then it is assumed that The frame is non-pitch frame, and setting frame type identification position is non-pitch type (being, for example, 0), wherein 0≤K≤1;
The computational methods of specific spectrum flatness are as follows:
The spectrum flatness SFM of arbitrary i-th frameiIt is defined as the geometric average of the amplitude of signal under the transform domain of the i-th frame signal The ratio between value and arithmetic mean of instantaneous value:
Wherein,For the geometric average of the i-th frame signal amplitude,Believe for the i-th frame The arithmetic average of number amplitude, ci(m) it is frequency coefficient of i-th frame in frequency point m, M is frequency-region signal frequency points.
Frequency coefficient can be original frequency coefficient after time-frequency domain variation, can also pass through original frequency domain coefficient Frequency coefficient after frequency spectrum shaping.
Preferably, after time-frequency domain being changed original frequency coefficient and by original frequency coefficient pass through frequency spectrum Frequency coefficient after shaping considers together, judges the type of present frame, such as:
The spectrum flatness for using the frequency coefficient by original frequency coefficient after frequency spectrum shaping to calculate is denoted as SFM, The spectrum flatness that the frequency coefficient for using time-frequency domain original after changing calculates is denoted as SFM ';
If SFM is less than the tenth threshold k, it is tone type that frame type identification position, which is arranged,;If SFM is not less than threshold k, It is non-pitch type that frame type identification position, which is then arranged,;
In addition, if SFM ' is less than another threshold k ', it is tone type to reset frame type identification position;If SFM ' Not less than threshold k ', then frame type identification position is not reset, wherein 0≤k≤1,0≤K '≤1.
Preferably, the part in whole frequency points of frequency coefficient can be used to calculate spectrum flatness.
Step 302:Step 301 can be carried out in coding side, then by obtained frame type identification together with encoding code stream one It rises and is sent to decoding end;
Step 301 can also be carried out in decoding end, at this moment since the frequency coefficient of lost frames has been lost, can not calculate spectrum Flatness, to only carry out the step to being properly received frame.
Step 303:The preceding n frame type identifications for being properly received frame for obtaining current lost frames, if preceding n frames medium pitch is believed The number of number frame is more than the 11st threshold value n0(0≤n0≤ n), then it is assumed that current lost frames are tone frame;Otherwise it is assumed that current lose Frame is non-pitch frame, wherein n >=1;
Step 304:If current lost frames are tone frame, current lost frames are compensated using the method for embodiment 2;If Current lost frames are non-pitch frame, then the method for using embodiment 1 compensates current lost frames.
When distinguishing long frame and short frame when encoder encodes, all long frames of three frames that can be only before current lost frames Or the method that embodiment 2 is just used when all short frames compensates current lost frames.
The characteristics of combining tone frame and non-pitch frame in embodiment 3, by judging that algorithms selection is suitble to own characteristic Compensation method compensates current lost frames, can reach better compensation effect.
Embodiment 4:
A voice/music signal classifier can be added on the basis of embodiment 3, when selection uses embodiment 1 Method compensate current lost frames when, the output identification of voice/music signal classifier, will influence embodiment 1 in step 102a and Method described in step 102b, other steps are the same as embodiment 3.
As shown in fig. 7, the step 102a in embodiment 1 can be revised as in example 4:
Step 401:The last one is properly received frame and is speech signal frame or is sound before first determining whether current lost frames Music signal frame;
Step 402:Then pitch period estimation is carried out using the method as described in 102a to current lost frames, uniquely not With, different pitch search bounds can be used for speech signal frame and music signal frame, such as:
For speech signal frame,
For music signal frame,
As shown in figure 8, the step 102b in embodiment 1 can be revised as in example 4:
Step 501:The last one before judging current lost frames is properly received frame and is speech signal frame or is music Signal frame;
Step 502:If it is speech signal frame that the last one, which is properly received frame, before current lost frames, step is used The method of 102b judges whether the pitch period for the current frame losing that search obtains can be used;If before current lost frames the last one It is music signal frame to be properly received frame, then judges that the pitch period for searching for obtained current frame losing whether may be used using following methods With:
If lost frames are located at mute section, it is believed that the pitch period value is unavailable;
If lost frames are not located at mute section, while maximum normalized autocorrelation value is more than the 19th threshold value R4When, 0 < R4 < 1, it is believed that the pitch period value is available;Maximum normalized autocorrelation value is not more than R4When, it is believed that the pitch period value is unavailable.
In example 4 when compensating current lost frames, the feature of speech signal frame and music signal frame is fully considered, greatly The big versatility for improving compensation method so that this method can all obtain good compensation effect under various scenes.
Embodiment 5:
The compensation that current lost frames are obtained using any one of embodiment 1 to embodiment 4 embodiment algorithm compensation is believed After number, which can also be multiplied by scale factor, the thermal compensation signal after scale factor will be multiplied by and lost as current The thermal compensation signal of frame, such as Fig. 9, specific method include:
Step 601:It compensates to obtain the thermal compensation signal of current lost frames using embodiment 1-4;
Step 602:Find the peak swing value b in the thermal compensation signal of current lost frames, and current lost frames former frame The peak swing value a of the time-domain signal of field afterwards;
Step 603:The ratio scale=a/b of a and b is calculated, and limits the value of scale within the scope of certain, such as When scale is more than the 17th threshold value ShWhen, it is S to take scaleh;When scale is less than the 18th threshold value SlWhen, it is S to take scalel
Step 604:To use the thermal compensation signal of current lost frames that embodiment 1-4 obtains be multiplied by point by point a scale because The initial value of son, scale factor g is 1, and is updated point by point, and update mode is:
G=β g+ (1- β) scale, 0≤β≤1;
It preferably, can also be according to the frame type of current lost frames, only by the thermal compensation signal of some frames in embodiment 5 It is multiplied by scale factor, and the thermal compensation signal of other frames is not then multiplied by scale factor and directly obtains thermal compensation signal.
The frame for needing to be multiplied by scale factor may include:Tone frame,
Alternatively, the speech frame of the not available non-pitch of pitch period, and the preceding field energy of the former frame of current lost frames Several times of the amount more than the rear field energy of the former frame of current lost frames.
In embodiment 5, increase Gain tuning in compensation method, steadily to compensate energy, reduces compensation noise.
As shown in Figure 10, present embodiment additionally provides a kind of frame losing compensation device of transform domain, including:Frequency coefficient meter Unit, converter unit and waveform adjustment unit are calculated, wherein:
Frequency coefficient computing unit is calculated for the frequency coefficient of former frame or preceding several frames using current lost frames The frequency coefficient of current lost frames;
Converter unit, the frequency coefficients of the current lost frames for frequency coefficient computing unit to be calculated is into line frequency Domain-time domain transformation, obtains the initial compensation signal of current lost frames;
Waveform adjustment unit obtains the thermal compensation signal of current lost frames for carrying out waveform adjustment to initial compensation signal.
Waveform adjustment unit is specifically used for carrying out pitch period estimation to current lost frames, judges that pitch period is estimated To pitch period value whether can be used, if pitch period value is unavailable, using the initial compensation signal of current lost frames as The thermal compensation signal of current lost frames;If pitch period value is available, the time-domain signal pair of the former frame of current lost frames is used Initial compensation signal carries out waveform adjustment.
As shown in figure 11, waveform adjustment unit includes pitch period subelement, wherein:
Pitch period subelement, the time-domain signal for being properly received frame to the last one before current lost frames carry out Pitch search, the last one before obtaining current lost frames are properly received the pitch period value of frame and maximum normalized autocorrelation Value, using obtained pitch period value as the pitch period value of current lost frames;Alternatively,
The last one before calculating current lost frames is properly received the pitch period value of frame, the fundamental tone that will be calculated Pitch period value of the periodic quantity as current lost frames, calculated pitch period value calculate current lost frames most Big normalized autocorrelation value.
Pitch period subelement is additionally operable in the time-domain signal for being properly received frame to the last one before current lost frames Carry out pitch search before, to the last one before current lost frames be properly received frame time-domain signal carry out low-pass filtering or Down-sampled processing is properly received the last one before low-pass filtering or down-sampled treated current lost frames the time domain of frame Signal carries out pitch search.
Waveform adjustment unit includes pitch period value judgment sub-unit, wherein:
Pitch period value judgment sub-unit meets any one in following condition for judging whether, appoints if met Meaning one, then it is assumed that pitch period value is unavailable, including:
The zero-crossing rate of the initial compensation signal of (1) first lost frames is more than first threshold Z1, wherein Z1> 0;
(2) ratio of low frequency energy and whole frame energy that the last one before current lost frames is properly received frame is less than the Two threshold value ER1, wherein ER1> 0;
(3) the last one spectrum for being properly received frame before current lost frames, which tilts, is less than third threshold value TILT, wherein 0 < TILT < 1;
(4) zero-crossing rate of the last one rear field for being properly received frame before current lost frames is more than the zero passage of preceding field Rate several times.
Pitch period value judgment sub-unit is additionally operable to be unsatisfactory for any one in condition (1)~condition (4) in judgement When, carry out the whether available judgement of pitch period value according to following principle:
(a) when current lost frames are located at mute section, it is believed that pitch period value is unavailable;
(b) it is not located at mute section in current lost frames, and maximum normalized autocorrelation value is more than the 4th threshold value R2When, it is believed that Pitch period value is available, wherein 0 < R2< 1;
(c) principle (a) and principle (b) are not being met, and the last one before current lost frames is properly received the mistake of frame Zero rate is more than the 5th threshold value Z3, it is believed that pitch period value is unavailable, wherein Z3> 0;
(d) principle (a), (b) and (c) are not being met, and when at this time long logarithmic energy with before current lost frames most The difference that the latter is properly received the logarithmic energy of frame is more than the 6th threshold value E4When, it is believed that pitch period value is unavailable, wherein E4> 0;
(e) the last one before not meeting principle (a), (b), (c) and (d) and current lost frames is properly received frame The difference of logarithmic energy and logarithmic energy when at this time long is more than the 7th threshold value E5, and maximum normalized autocorrelation value is more than the 8th Threshold value R3When, it is believed that pitch period value is available, wherein E50,0 < R of >3< 1;
(f) principle (a), (b), (c), (d) and when (e) are not being met, check before current lost frames the last one just The harmonic characterisitic of true receiving frame, when indicating that the value of harmonic characterisitic is less than the 9th threshold value H, it is believed that pitch period value is unavailable;When When indicating that the value of harmonic characterisitic is more than or equal to the 9th threshold value H, it is believed that pitch period value is available, wherein H < 1.
Waveform adjustment unit includes adjustment subelement, wherein:
Subelement is adjusted, it is L+L to establish length for (i)1Buffer area, L is frame length, L1> 0;
(ii) to the preceding L of buffer area1A unit is initialized, and initialization includes:It is the first loss in current lost frames When frame, the preceding L in allocating cache area1A unit is the preceding L of the initial compensation signal of current lost frames1The signal of length;It is lost currently When mistake frame is not the first lost frames, the preceding L in allocating cache area1A unit is to the initial of the previous lost frames of current lost frames Thermal compensation signal carries out the last L in buffer area used when waveform adjustment1The signal of length;
(iii) by the time-domain signal of the last one pitch period of the former frame of current lost frames together with the L in buffer area1 The signal of length together, in continuous repeat replication to buffer area, until fill up buffer area, when being replicated every time, if delayed The length for depositing existing signal in area is l, then this time replicating the l-L of signal replication to buffer area1To the position of l+T-1 On, wherein l > 0, T are pitch period, and the length for formation is L1Crossover region, the signal in crossover region is by two parts of signals Corresponding points addition obtains after adding window;
(iv) using the signal of the preceding L length in buffer area as the thermal compensation signal of current lost frames.
Subelement is adjusted, is additionally operable to be properly received frame, the caching that structure length is L for first after current lost frames Buffer area fills up according to the corresponding method of step (ii) and step (iii) in area, by buffer area signal with to current lost frames First later is properly received the time-domain signal that frame decoding obtains and does adding window overlap-add, using obtained signal as currently losing Lose first time-domain signal for being properly received frame after frame.
Alternatively, adjustment subelement, for building the buffer area that length is kL, L is frame length, k > 0;
To the preceding L of buffer area1A unit is initialized, wherein L1> 0, initialization include:It is the in current lost frames When one lost frames, the preceding L in allocating cache area1A unit is the preceding L of the initial compensation signal of current lost frames1The signal of length; When current lost frames are not the first lost frames, the preceding L in allocating cache area1A unit is the previous lost frames to current lost frames Initial compensation signal carry out waveform adjustment when buffer area used in last L1The signal of length;
By the time-domain signal of the last one pitch period of the former frame of current lost frames together with the L in buffer area1Length Signal together, in continuous repeat replication to buffer area, until fill up buffer area obtain length be kL time-domain signal, carrying out When replicating every time, if the length of existing signal is l in buffer area, this time replicate the l- of signal replication to buffer area L1Onto the position of l+T-1, wherein l > 0, T are pitch period, and the length for formation is L1Crossover region, the letter in crossover region Number by after two parts of signals adding window corresponding points addition obtain;
According to temporal order by the signal in the buffer area successively thermal compensation signal as current lost frames to q lost frames, When q is less than k, by buffer area q+1 frame signals with frame decoding be properly received to first after current lost frames obtain To time-domain signal do overlap-add, using obtained signal as first time domain for being properly received frame after current lost frames Signal;Alternatively,
According to temporal order by the preceding k-1 frame signals in buffer area successively as current lost frames to -1 lost frames of kth Thermal compensation signal, the kth frame signal in buffer area is used to do overlap-add with the initial compensation signal of kth lost frames, by what is obtained Thermal compensation signal of the signal as kth lost frames.
Waveform adjustment unit further includes gain subelement, wherein:
Gain subelement, for after carrying out waveform adjustment to initial compensation signal, the signal after also adjusting waveform to multiply With a gain, the signal after gain will be multiplied by as the thermal compensation signal of current lost frames.
Pitch period subelement uses different bases when carrying out pitch search, for speech signal frame and music signal frame Sound searches for bound.
It is speech signal frame that the last one of pitch period value judgment sub-unit before current lost frames, which is properly received frame, When, judge whether the pitch period value of current lost frames can be used using aforesaid way.
Pitch period value judgment sub-unit, the last one being additionally operable to before current lost frames are properly received frame as music When signal frame, judge whether the pitch period value of current lost frames can be used using following methods, including:
If current lost frames are located at mute section, it is believed that pitch period value is unavailable;Alternatively,
If current lost frames are not located at mute section, maximum normalized autocorrelation value is more than the 19th threshold value R4, 0 < R4< 1, it is believed that pitch period value is available;Maximum normalized autocorrelation value is not more than R4, it is believed that pitch period value is unavailable.
Waveform adjustment unit further includes noise addition subelement, wherein:
Noise adds subelement, for after the thermal compensation signal for obtaining current lost frames, noise to be added in thermal compensation signal.
Noise adds subelement, is specifically used for, by historical signal or initial compensation signal itself, passing through a high-pass filtering Device or spectral tilt filter obtain noise signal;
Estimate the noise gain value of current lost frames;
Obtained noise signal is multiplied by the noise gain value for the current lost frames that estimation obtains, after noise gain value will be multiplied Noise signal be added thermal compensation signal in.
Device further includes scale factor unit, wherein:
Scale factor unit, for after the thermal compensation signal that waveform adjustment unit obtains current lost frames, compensation to be believed Number it is multiplied by scale factor.
Scale factor unit, specifically for after the thermal compensation signal that waveform adjustment unit obtains current lost frames, according to The frame type of current lost frames, it is determined whether the thermal compensation signal of current lost frames is multiplied by scale factor, if it is determined that be multiplied by ruler The factor is spent, then into the operation for being about to thermal compensation signal and being multiplied by scale factor.
As shown in figure 12, the frame losing compensation device for another transform domain that present embodiment provides, including:First phase width It is worth acquiring unit, second phase amplitude acquiring unit and thermal compensation signal acquiring unit, wherein:
First phase amplitude acquiring unit, phase and width for each frequency point of several frames before obtaining current lost frames Value;
Second phase amplitude acquiring unit, for the phase of each frequency point of several frames before the current lost frames of acquisition and Amplitude is linearly or nonlinearly extrapolated, and the phase and amplitude of each frequency point of current lost frames is obtained;
Thermal compensation signal acquiring unit, the phase and amplitude for each frequency point by current lost frames obtain current lost frames Each frequency point frequency coefficient, the thermal compensation signal of current frame losing is obtained by frequency-time-domain-transformation.
First phase amplitude acquiring unit is specifically used for when current lost frames are pth frame, before current lost frames Several frame time-domain signals obtain the MDST coefficients of -3 frame of -2 frame of pth and pth using improved discrete sine transform MDST algorithms, By the domains the MDCT coefficients of the MDST coefficients of obtained -3 frame of -2 frame of pth and pth and -3 frame of -2 frame of pth and pth composition MDCT-MDST Complex signal;
Second phase amplitude acquiring unit, specifically for extrapolating the phase linearity of -3 frame of -2 frame of pth and pth to obtain pth The phase of the complex signal in the domains MDCT-MDST of each frequency point of frame;Each frequency of pth frame is replaced using the amplitude of the corresponding frequency point of -2 frame of pth The amplitude of point;
Thermal compensation signal acquiring unit is specifically used for the phase of the complex signal in the domains MDCT-MDST according to each frequency point of pth frame With the amplitude of each frequency point of pth frame infer pth frame each frequency point MDCT coefficients.
Device further includes frequency point selecting unit, wherein:
Frequency point selecting unit, the frame types for being properly received frame according to the nearest c before current lost frames, selection are No each frequency point to current lost frames utilizes the phase and amplitude before current lost frames at each frequency point of several frames, into line Property or nonlinear extrapolation obtain the phase and amplitude of each frequency point of current lost frames.
Device further includes scale factor unit, wherein:
Scale factor unit, for after the thermal compensation signal that thermal compensation signal acquiring unit obtains current lost frames, will mend It repays signal and is multiplied by scale factor.
Scale factor unit, specifically for after the thermal compensation signal that thermal compensation signal acquiring unit obtains current lost frames, According to the frame type of current lost frames, it is determined whether the thermal compensation signal of current lost frames is multiplied by scale factor, if it is determined that multiply With scale factor, then into the operation for being about to thermal compensation signal and being multiplied by scale factor.
The frame losing compensation device of another transform domain of present embodiment, including:Judging unit, wherein:
Judging unit, for by judging that algorithm, selection compensate current lost frames using the device of Figure 10 or Figure 12.
Judging unit is specifically used for judgment frame type, if current lost frames are tone frame, uses the device in Figure 12 Compensate current lost frames;If current lost frames are non-pitch frame, current lost frames are compensated using the device in Figure 10.
Judging unit, specifically for obtaining the preceding n frame type identifications for being properly received frame of current lost frames, if preceding n A number for being properly received frame medium pitch frame is more than the 11st threshold value n0, then it is assumed that current lost frames are tone frame;Otherwise it is assumed that Current lost frames are non-pitch frame, wherein 0≤n0≤ n, n >=1.
Judging unit is specifically used for calculating the spectrum flatness of frame, judges whether the value for composing flatness is less than the tenth threshold k, Then think that the frame is tone frame if it is less than K;Otherwise it is assumed that the frame is non-pitch frame, wherein 0≤K≤1.
Judging unit calculate compose flatness when, the frequency coefficient for calculating is original frequency after time-frequency domain variation Domain coefficient, or the frequency coefficient by original frequency domain coefficient after frequency spectrum shaping.
Judging unit is specifically used for using original frequency coefficient after time-frequency domain variation and by original frequency domain coefficient Frequency coefficient after frequency spectrum shaping calculates separately the spectrum flatness of frame, obtains the corresponding two spectrums flatness of frame;
Whether it is less than the tenth threshold k according to the value for one of obtaining spectrum flatness, sets whether the frame is tone frame; Whether the value that flatness is composed according to obtained other in which is less than another threshold k ', reset whether the frame is tone frame;
Wherein, when the value for composing flatness is less than K, then frame is set as tone frame;Otherwise, frame is set as non-pitch frame, When the value of another spectrum flatness is less than K ', it is tone frame to reset the frame;Wherein, 0≤K≤1,0≤K '≤1.
Certainly, the invention may also have other embodiments, without deviating from the spirit and substance of the present invention, ripe Various corresponding change and deformations, but these corresponding change and deformations can be made according to the present invention by knowing those skilled in the art The protection domain of appended claims of the invention should all be belonged to.
One of ordinary skill in the art will appreciate that all or part of step in the above method can be instructed by program Related hardware is completed, and described program can be stored in computer readable storage medium, such as read-only memory, disk or CD Deng.Optionally, all or part of step of above-described embodiment can also be realized using one or more integrated circuits.Accordingly Ground, the form that hardware may be used in each module/unit in above-described embodiment are realized, the shape of software function module can also be used Formula is realized.The present invention is not limited to the combinations of the hardware and software of any particular form.

Claims (51)

1. a kind of frame losing compensation method of transform domain, which is characterized in that the method includes:
Using the former frame of current lost frames or the frequency coefficient of preceding several frames, the frequency coefficient of current lost frames is calculated, to meter The frequency coefficient of obtained current lost frames carries out frequency-time-domain-transformation, obtains the initial compensation signal of current lost frames;
Waveform adjustment is carried out to the initial compensation signal, obtains the thermal compensation signal of current lost frames, including:
Pitch period estimation is carried out to current lost frames, judges whether the pitch period value that pitch period is estimated can be used, such as Fruit pitch period value is unavailable, then using the initial compensation signal of current lost frames as the thermal compensation signal of current lost frames;If Pitch period value is available, then carries out waveform adjustment to initial compensation signal using the time-domain signal of the former frame of current lost frames.
2. the method as described in claim 1, which is characterized in that pitch period estimation is carried out to current lost frames, including:
The time-domain signal that frame is properly received to the last one before current lost frames carries out pitch search, obtains current lost frames Before the last one is properly received the pitch period value of frame and maximum normalized autocorrelation value, and obtained pitch period value is made For the pitch period value of current lost frames.
3. method as claimed in claim 2, which is characterized in that further include:
Before the time-domain signal for being properly received frame to the last one before current lost frames carries out pitch search, to currently losing The last one time-domain signal for being properly received frame before losing frame carries out low-pass filtering or down-sampled processing, to low-pass filtering or drop The last one time-domain signal for being properly received frame before current lost frames after sampling processing carries out pitch search.
4. the method as described in claim 1, which is characterized in that pitch period estimation is carried out to current lost frames, including:
The last one before calculating current lost frames is properly received the pitch period value of frame, the pitch period that will be calculated It is worth the pitch period value as current lost frames, the maximum that calculated pitch period value calculates current lost frames is returned One changes autocorrelation value.
5. the method as described in claim 1,2,3 or 4, which is characterized in that judge the pitch period that pitch period is estimated Whether value can be used, including:
Judging whether to meet any one in following condition, if meeting any one, then it is assumed that pitch period value is unavailable, Including:
The zero-crossing rate of the initial compensation signal of (1) first lost frames is more than first threshold Z1, wherein Z1>0;
(2) ratio of the last one low frequency energy and whole frame energy for being properly received frame before current lost frames is less than the second threshold Value ER1, wherein ER1>0;
(3) the last one spectrum for being properly received frame before current lost frames, which tilts, is less than third threshold value TILT, wherein 0<TILT <1;
(4) if the zero-crossing rate of the last one rear field for being properly received frame before current lost frames is more than the zero-crossing rate of preceding field Dry times.
6. method as claimed in claim 5, which is characterized in that further include:
When judging to be unsatisfactory for any one in the condition (1)~condition (4), pitch period value is carried out according to following principle Whether available judgement:
(a) when current lost frames are located at mute section, it is believed that pitch period value is unavailable;
(b) it is not located at mute section in current lost frames, and maximum normalized autocorrelation value is more than the 4th threshold value R2When, it is believed that fundamental tone Periodic quantity is available, wherein 0<R2<1;
(c) principle (a) and principle (b) are not being met, and the last one before current lost frames is properly received the zero-crossing rate of frame More than the 5th threshold value Z3, it is believed that pitch period value is unavailable, wherein Z3>0;
(d) principle (a), (b) and (c) are not being met, and logarithmic energy and last before current lost frames when at this time long The difference of a logarithmic energy for being properly received frame is more than the 6th threshold value E4When, it is believed that pitch period value is unavailable, wherein E4>0;
(e) the last one before not meeting principle (a), (b), (c) and (d) and current lost frames is properly received the logarithm of frame The difference of energy and logarithmic energy when at this time long is more than the 7th threshold value E5, and the maximum normalized autocorrelation value is more than the 8th Threshold value R3When, it is believed that pitch period value is available, wherein E5>0,0<R3<1;
(f) when not meeting principle (a), (b), (c), (d) with (e), the last one before checking current lost frames correctly connects The harmonic characterisitic for receiving frame, when indicating that the value of harmonic characterisitic is less than the 9th threshold value H, it is believed that pitch period value is unavailable;Work as expression When the value of harmonic characterisitic is more than or equal to the 9th threshold value H, it is believed that pitch period value is available, wherein H<1.
7. the method as described in claim 1, which is characterized in that use the time-domain signal of the former frame of current lost frames to initial Thermal compensation signal carries out waveform adjustment, including:
(i) it is L+L to establish length1Buffer area, L is frame length, L1>0;
(ii) to the preceding L of buffer area1A unit is initialized, and the initialization includes:It is the first lost frames in current lost frames When, the preceding L in allocating cache area1A unit is the preceding L of the initial compensation signal of current lost frames1The signal of length;It is lost currently When frame is not the first lost frames, the preceding L in allocating cache area1A unit is the initial benefit to the previous lost frames of current lost frames Last L when repaying signal progress waveform adjustment in buffer area used1The signal of length;
(iii) by the time-domain signal of the last one pitch period of the former frame of current lost frames together with the L in buffer area1Length Signal together, in continuous repeat replication to buffer area, until fill up buffer area, when being replicated every time, if buffer area In the length of existing signal be l, then this time replicating the l-L of signal replication to buffer area1Onto the position of l+T-1, Middle l>0, T is pitch period, and the length for formation is L1Crossover region, after signal in crossover region is by two parts of signals adding window Corresponding points addition obtains;
(iv) using the signal of the preceding L length in buffer area as the thermal compensation signal of current lost frames.
8. the method for claim 7, which is characterized in that further include:
It is properly received frame, the buffer area that structure length is L, according to step (ii) and step for first after current lost frames (iii) corresponding method fills up buffer area, by buffer area signal with it is correct to first after the current lost frames It receives the obtained time-domain signal of frame decoding and does adding window overlap-add, using obtained signal as the after the current lost frames One time-domain signal for being properly received frame.
9. the method as described in claim 1, which is characterized in that use the time-domain signal of the former frame of current lost frames to initial Thermal compensation signal carries out waveform adjustment, including:
The buffer area that length is kL is built, L is frame length, k>0;
To the preceding L of buffer area1A unit is initialized, wherein L1>0, the initialization includes:It is first in current lost frames When lost frames, the preceding L in allocating cache area1A unit is the preceding L of the initial compensation signal of current lost frames1The signal of length;Working as When preceding lost frames are not the first lost frames, the preceding L in allocating cache area1A unit is to the previous lost frames of current lost frames Initial compensation signal carries out the last L in buffer area used when waveform adjustment1The signal of length;
By the time-domain signal of the last one pitch period of the former frame of current lost frames together with the L in buffer area1The signal of length Together, it in continuous repeat replication to buffer area, until filling up buffer area obtains the time-domain signal that length is kL, is carrying out every time again When processed, if the length of existing signal is l in buffer area, this time replicate the l-L of signal replication to buffer area1To l+ On the position of T-1, wherein l>0, T is pitch period, and the length for formation is L1Crossover region, the signal in crossover region is by two Corresponding points addition obtains after part signal adding window;
It is small in q according to temporal order by the signal in the buffer area successively thermal compensation signal as current lost frames to q lost frames When k, by buffer area q+1 frame signals with to first after current lost frames be properly received that frame decoding obtains when Domain signal does overlap-add, using obtained signal as first time-domain signal for being properly received frame after current lost frames; Alternatively,
According to temporal order by the preceding k-1 frame signals in buffer area successively as current lost frames to the compensation of -1 lost frames of kth Signal, the kth frame signal in buffer area are used to do overlap-add with the initial compensation signal of kth lost frames, the signal that will be obtained Thermal compensation signal as kth lost frames.
10. the method as described in claim 7~9 is one of arbitrary, which is characterized in that further include:
After carrying out waveform adjustment to initial compensation signal, the signal after also adjusting waveform is multiplied by a gain, will be multiplied by increasing Thermal compensation signal of the signal as current lost frames after benefit.
11. method as claimed in claim 2, which is characterized in that when carrying out pitch search, for speech signal frame and music Signal frame uses different pitch search bounds.
12. method as claimed in claim 6, which is characterized in that the last one before current lost frames is properly received frame For speech signal frame when, judge whether the pitch period value of current lost frames can be used using the method for claim 5 or 6.
13. method as claimed in claim 12, which is characterized in that the last one before current lost frames is properly received frame For music signal frame when, judge whether the pitch period value of current lost frames can be used using following methods, including:
If current lost frames are located at mute section, it is believed that pitch period value is unavailable;Alternatively,
If current lost frames are not located at mute section, maximum normalized autocorrelation value is more than the 19th threshold value R4, 0<R4<1, it is believed that Pitch period value is available;Maximum normalized autocorrelation value is not more than R4, it is believed that pitch period value is unavailable.
14. the method as described in claim 7~9 is one of arbitrary, which is characterized in that further include:Obtaining current lost frames After thermal compensation signal, noise is added in thermal compensation signal.
15. method as claimed in claim 14, which is characterized in that noise is added in thermal compensation signal, including:
By historical signal or initial compensation signal itself, noise is obtained by a high-pass filter or spectral tilt filter Signal;
Estimate the noise gain value of current lost frames;
Obtained noise signal is multiplied by the noise gain value of current lost frames that estimation obtains, making an uproar after noise gain value will be multiplied Acoustical signal is added in the thermal compensation signal.
16. the method as described in claim 1, which is characterized in that further include:
After the thermal compensation signal for obtaining current lost frames, thermal compensation signal is also multiplied by scale factor.
17. the method described in claim 16, which is characterized in that further include:
After the thermal compensation signal for obtaining current lost frames, according to the frame type of current lost frames, it is determined whether will currently lose The thermal compensation signal of frame is multiplied by scale factor, if it is determined that be multiplied by scale factor, then carry out it is described by thermal compensation signal be multiplied by scale because The operation of son.
18. a kind of frame losing compensation method of transform domain, which is characterized in that the method includes:
The phase and amplitude of each frequency point of several frames before obtaining current lost frames;
It is linearly or nonlinearly extrapolated, is obtained to the phase and amplitude of each frequency point of several frames before the current lost frames of acquisition The phase and amplitude of each frequency point of current lost frames;
The frequency coefficient that each frequency point of current lost frames is obtained by the phase and amplitude of each frequency point of current lost frames passes through frequency Domain-time domain converts to obtain the thermal compensation signal of current frame losing;According to the frame type of current lost frames, it is determined whether by current lost frames Thermal compensation signal be multiplied by scale factor, if it is determined that be multiplied by scale factor, then into the behaviour for being about to thermal compensation signal and being multiplied by scale factor Make.
19. method as claimed in claim 18, which is characterized in that the phase of each frequency point of several frames before obtaining current lost frames Position and amplitude;The phase and amplitude of each frequency point of several frames before the current lost frames of acquisition is carried out linearly or nonlinearly outer It pushes away, obtains the phase and amplitude of each frequency point of current lost frames;It is obtained by the phase and amplitude of each frequency point of current lost frames The frequency coefficient of each frequency point of current lost frames, including:
When current lost frames are pth frame, to several frame time-domain signals before current lost frames, using improved discrete sine Transformation MDST algorithms obtain the MDST coefficients of -3 frame of -2 frame of pth and pth, by the MDST coefficients of obtained -3 frame of -2 frame of pth and pth With the complex signal in the domains MDCT coefficients composition MDCT-MDST of -3 frame of -2 frame of pth and pth;
The phase linearity of -3 frame of -2 frame of pth and pth is extrapolated to obtain the complex signal in the domains MDCT-MDST of each frequency point of pth frame Phase;
The amplitude of each frequency point of pth frame is replaced using the amplitude of the corresponding frequency point of -2 frame of pth;
Infer pth frame according to the phase of the complex signal in the domains MDCT-MDST of each frequency point of pth frame and the amplitude of each frequency point of pth frame In the MDCT coefficients of each frequency point.
20. method as claimed in claim 19, which is characterized in that further include:
According to the nearest c frame types for being properly received frame before current lost frames, each frequency to current lost frames is chosen whether Point utilizes the phase and amplitude before current lost frames at each frequency point of several frames, carries out linearly or nonlinearly extrapolation and is worked as The phase and amplitude of each frequency point of preceding lost frames.
21. a kind of frame losing compensation method of transform domain, it is characterised in that:
By judging that algorithm, selection are worked as using the method compensation that claim 1~17 is any or claim 18~20 is any Preceding lost frames.
22. method as claimed in claim 21, which is characterized in that by judging that algorithm, selection use claim 1~17 times One or any method of claim 18~20 compensate current lost frames, including:
Judgment frame type is compensated current if current lost frames are tone frame using any method of claim 18~20 Lost frames;If current lost frames are non-pitch frame, current lost frames are compensated using any method of claim 1~17.
23. method as claimed in claim 22, which is characterized in that judgment frame type, including:
The preceding n frame type identifications for being properly received frame for obtaining current lost frames, if preceding n are properly received frame medium pitch frame Number is more than the 11st threshold value n0, then it is assumed that current lost frames are tone frame;Otherwise it is assumed that current lost frames are non-pitch frame, In, 0≤n0≤ n, n >=1.
24. method as claimed in claim 22, which is characterized in that judgment frame type, including:
The spectrum flatness for calculating frame, judges whether the value for composing flatness is less than the tenth threshold k, then thinks that the frame is if it is less than K Tone frame;Otherwise it is assumed that the frame is non-pitch frame, wherein 0≤K≤1.
25. method as claimed in claim 24, which is characterized in that when calculating spectrum flatness, the frequency coefficient for calculating It is original frequency coefficient after time-frequency domain variation, or the frequency coefficient by original frequency domain coefficient after frequency spectrum shaping.
26. method as claimed in claim 22, which is characterized in that judgment frame type, including:
Original frequency coefficient and the frequency domain system by original frequency domain coefficient after frequency spectrum shaping after being changed using time-frequency domain Number calculates separately the spectrum flatness of frame, obtains the corresponding two spectrums flatness of frame;
Whether it is less than the tenth threshold k according to the value for one of obtaining spectrum flatness, sets whether the frame is tone frame;According to Whether the value of obtained other in which spectrum flatness is less than another threshold k ', reset whether the frame is tone frame;
Wherein, when the value for composing flatness is less than K, then frame is set as tone frame;Otherwise, frame is set as non-pitch frame, another When the value of a spectrum flatness is less than K ', it is tone frame to reset the frame;Wherein, 0≤K≤1,0≤K '≤1.
27. a kind of frame losing compensation device of transform domain, which is characterized in that described device includes:Frequency coefficient computing unit, transformation Unit and waveform adjustment unit, wherein:
The frequency coefficient computing unit is calculated for the frequency coefficient of former frame or preceding several frames using current lost frames The frequency coefficient of current lost frames;
The frequency coefficient of the converter unit, the current lost frames for the frequency coefficient computing unit to be calculated carries out Frequency-time-domain-transformation obtains the initial compensation signal of current lost frames;
The waveform adjustment unit obtains the compensation of current lost frames for carrying out waveform adjustment to the initial compensation signal Signal is specifically used for carrying out pitch period estimation to current lost frames, judges that the pitch period value that pitch period is estimated is It is no available, if pitch period value is unavailable, using the initial compensation signal of current lost frames as the compensation of current lost frames Signal;If pitch period value is available, initial compensation signal is carried out using the time-domain signal of the former frame of current lost frames Waveform adjusts.
28. device as claimed in claim 27, which is characterized in that the waveform adjustment unit includes pitch period subelement, Wherein:
The pitch period subelement, the time-domain signal for being properly received frame to the last one before current lost frames carry out Pitch search, the last one before obtaining current lost frames are properly received the pitch period value of frame and maximum normalized autocorrelation Value, using obtained pitch period value as the pitch period value of current lost frames;Alternatively,
The last one before calculating current lost frames is properly received the pitch period value of frame, the pitch period that will be calculated It is worth the pitch period value as current lost frames, the maximum that calculated pitch period value calculates current lost frames is returned One changes autocorrelation value.
29. device as claimed in claim 28, it is characterised in that:
The pitch period subelement is additionally operable in the time-domain signal for being properly received frame to the last one before current lost frames Carry out pitch search before, to the last one before current lost frames be properly received frame time-domain signal carry out low-pass filtering or Down-sampled processing is properly received the last one before low-pass filtering or down-sampled treated current lost frames the time domain of frame Signal carries out pitch search.
30. the device as described in claim 27,28 or 29, which is characterized in that the waveform adjustment unit includes pitch period It is worth judgment sub-unit, wherein:
The pitch period value judgment sub-unit meets any one in following condition for judging whether, appoints if met Meaning one, then it is assumed that pitch period value is unavailable, including:
The zero-crossing rate of the initial compensation signal of (1) first lost frames is more than first threshold Z1, wherein Z1>0;
(2) ratio of the last one low frequency energy and whole frame energy for being properly received frame before current lost frames is less than the second threshold Value ER1, wherein ER1>0;
(3) the last one spectrum for being properly received frame before current lost frames, which tilts, is less than third threshold value TILT, wherein 0<TILT <1;
(4) if the zero-crossing rate of the last one rear field for being properly received frame before current lost frames is more than the zero-crossing rate of preceding field Dry times.
31. device as claimed in claim 30, it is characterised in that:
The pitch period value judgment sub-unit is additionally operable to be unsatisfactory in judgement any one in the condition (1)~condition (4) When a, the whether available judgement of pitch period value is carried out according to following principle:
(a) when current lost frames are located at mute section, it is believed that pitch period value is unavailable;
(b) it is not located at mute section in current lost frames, and maximum normalized autocorrelation value is more than the 4th threshold value R2When, it is believed that fundamental tone Periodic quantity is available, wherein 0<R2<1;
(c) principle (a) and principle (b) are not being met, and the last one before current lost frames is properly received the zero-crossing rate of frame More than the 5th threshold value Z3, it is believed that pitch period value is unavailable, wherein Z3>0;
(d) principle (a), (b) and (c) are not being met, and logarithmic energy and last before current lost frames when at this time long The difference of a logarithmic energy for being properly received frame is more than the 6th threshold value E4When, it is believed that pitch period value is unavailable, wherein E4>0;
(e) the last one before not meeting principle (a), (b), (c) and (d) and current lost frames is properly received the logarithm of frame The difference of energy and logarithmic energy when at this time long is more than the 7th threshold value E5, and the maximum normalized autocorrelation value is more than the 8th Threshold value R3When, it is believed that pitch period value is available, wherein E5>0,0<R3<1;
(f) when not meeting principle (a), (b), (c), (d) with (e), the last one before checking current lost frames correctly connects The harmonic characterisitic for receiving frame, when indicating that the value of harmonic characterisitic is less than the 9th threshold value H, it is believed that pitch period value is unavailable;Work as expression When the value of harmonic characterisitic is more than or equal to the 9th threshold value H, it is believed that pitch period value is available, wherein H<1.
32. device as claimed in claim 27, which is characterized in that the waveform adjustment unit includes adjustment subelement, wherein:
The adjustment subelement, it is L+L to establish length for (i)1Buffer area, L is frame length, L1>0;
(ii) to the preceding L of buffer area1A unit is initialized, and the initialization includes:It is the first lost frames in current lost frames When, the preceding L in allocating cache area1A unit is the preceding L of the initial compensation signal of current lost frames1The signal of length;It is lost currently When frame is not the first lost frames, the preceding L in allocating cache area1A unit is the initial benefit to the previous lost frames of current lost frames Last L when repaying signal progress waveform adjustment in buffer area used1The signal of length;
(iii) by the time-domain signal of the last one pitch period of the former frame of current lost frames together with the L in buffer area1Length Signal together, in continuous repeat replication to buffer area, until fill up buffer area, when being replicated every time, if buffer area In the length of existing signal be l, then this time replicating the l-L of signal replication to buffer area1Onto the position of l+T-1, Middle l>0, T is pitch period, and the length for formation is L1Crossover region, after signal in crossover region is by two parts of signals adding window Corresponding points addition obtains;
(iv) using the signal of the preceding L length in buffer area as the thermal compensation signal of current lost frames.
33. device as claimed in claim 32, it is characterised in that:
The adjustment subelement is additionally operable to be properly received frame, the caching that structure length is L for first after current lost frames Area fills up buffer area according to step (ii) and the corresponding method of step (iii), the signal in buffer area is currently lost with to described First after mistake frame is properly received the time-domain signal that frame decoding obtains and does adding window overlap-add, using obtained signal as institute State first time-domain signal for being properly received frame after current lost frames.
34. device as claimed in claim 27, which is characterized in that the waveform adjustment unit includes adjustment subelement, wherein:
The adjustment subelement, for building the buffer area that length is kL, L is frame length, k>0;
To the preceding L of buffer area1A unit is initialized, wherein L1>0, the initialization includes:It is first in current lost frames When lost frames, the preceding L in allocating cache area1A unit is the preceding L of the initial compensation signal of current lost frames1The signal of length;Working as When preceding lost frames are not the first lost frames, the preceding L in allocating cache area1A unit is to the previous lost frames of current lost frames Initial compensation signal carries out the last L in buffer area used when waveform adjustment1The signal of length;
By the time-domain signal of the last one pitch period of the former frame of current lost frames together with the L in buffer area1The signal of length Together, it in continuous repeat replication to buffer area, until filling up buffer area obtains the time-domain signal that length is kL, is carrying out every time again When processed, if the length of existing signal is l in buffer area, this time replicate the l-L of signal replication to buffer area1To l+ On the position of T-1, wherein l>0, T is pitch period, and the length for formation is L1Crossover region, the signal in crossover region is by two Corresponding points addition obtains after part signal adding window;
It is small in q according to temporal order by the signal in the buffer area successively thermal compensation signal as current lost frames to q lost frames When k, by buffer area q+1 frame signals with to first after current lost frames be properly received that frame decoding obtains when Domain signal does overlap-add, using obtained signal as first time-domain signal for being properly received frame after current lost frames; Alternatively,
According to temporal order by the preceding k-1 frame signals in buffer area successively as current lost frames to the compensation of -1 lost frames of kth Signal, the kth frame signal in buffer area are used to do overlap-add with the initial compensation signal of kth lost frames, the signal that will be obtained Thermal compensation signal as kth lost frames.
35. the device as described in claim 32,33 or 34, which is characterized in that the waveform adjustment unit further includes gain Unit, wherein:
The gain subelement, for after carrying out waveform adjustment to initial compensation signal, the signal after also adjusting waveform to multiply With a gain, the signal after gain will be multiplied by as the thermal compensation signal of current lost frames.
36. device as claimed in claim 28, it is characterised in that:
The pitch period subelement uses different bases when carrying out pitch search, for speech signal frame and music signal frame Sound searches for bound.
37. device as claimed in claim 31, it is characterised in that:
It is speech signal frame that the last one of the pitch period value judgment sub-unit before current lost frames, which is properly received frame, When, judge whether the pitch period value of current lost frames can be used using claim 34 or 35.
38. device as claimed in claim 37, it is characterised in that:
The pitch period value judgment sub-unit, the last one being additionally operable to before current lost frames are properly received frame as music When signal frame, judge whether the pitch period value of current lost frames can be used using following methods, including:
If current lost frames are located at mute section, it is believed that pitch period value is unavailable;Alternatively,
If current lost frames are not located at mute section, maximum normalized autocorrelation value is more than the 19th threshold value R4, 0<R4<1, it is believed that Pitch period value is available;Maximum normalized autocorrelation value is not more than R4, it is believed that pitch period value is unavailable.
39. the device as described in claim 32,33 or 34, which is characterized in that the waveform adjustment unit further includes that noise adds Add subelement, wherein:
The noise adds subelement, for after the thermal compensation signal for obtaining current lost frames, noise to be added in thermal compensation signal.
40. device as claimed in claim 39, it is characterised in that:
The noise adds subelement, is specifically used for, by historical signal or initial compensation signal itself, passing through a high-pass filtering Device or spectral tilt filter obtain noise signal;
Estimate the noise gain value of current lost frames;
Obtained noise signal is multiplied by the noise gain value of current lost frames that estimation obtains, making an uproar after noise gain value will be multiplied Acoustical signal is added in the thermal compensation signal.
41. device as claimed in claim 27, which is characterized in that described device further includes scale factor unit, wherein:
The scale factor unit will be mended after obtaining the thermal compensation signal of current lost frames in the waveform adjustment unit It repays signal and is multiplied by scale factor.
42. device as claimed in claim 41, it is characterised in that:
The scale factor unit, after obtaining the thermal compensation signal of current lost frames in the waveform adjustment unit, According to the frame type of current lost frames, it is determined whether the thermal compensation signal of current lost frames is multiplied by scale factor, if it is determined that multiply With scale factor, then the operation that thermal compensation signal is multiplied by scale factor is carried out.
43. a kind of frame losing compensation device of transform domain, which is characterized in that described device includes:First phase amplitude acquiring unit, Second phase amplitude acquiring unit, thermal compensation signal acquiring unit and scale factor unit, wherein:
The first phase amplitude acquiring unit, phase and width for each frequency point of several frames before obtaining current lost frames Value;
The second phase amplitude acquiring unit, for the phase of each frequency point of several frames before the current lost frames of acquisition and Amplitude is linearly or nonlinearly extrapolated, and the phase and amplitude of each frequency point of current lost frames is obtained;
The thermal compensation signal acquiring unit, the phase and amplitude for each frequency point by current lost frames obtain current lost frames Each frequency point frequency coefficient, the thermal compensation signal of current frame losing is obtained by frequency-time-domain-transformation;
The scale factor unit, after obtaining the thermal compensation signal of current lost frames in the thermal compensation signal acquiring unit, According to the frame type of current lost frames, it is determined whether the thermal compensation signal of current lost frames is multiplied by scale factor, if it is determined that multiply With scale factor, then into the operation for being about to thermal compensation signal and being multiplied by scale factor.
44. device as claimed in claim 43, it is characterised in that:
The first phase amplitude acquiring unit is specifically used for when current lost frames are pth frame, before current lost frames Several frame time-domain signals obtain the MDST coefficients of -3 frame of -2 frame of pth and pth using improved discrete sine transform MDST algorithms, By the domains the MDCT coefficients of the MDST coefficients of obtained -3 frame of -2 frame of pth and pth and -3 frame of -2 frame of pth and pth composition MDCT-MDST Complex signal;
The second phase amplitude acquiring unit, specifically for extrapolating the phase linearity of -3 frame of -2 frame of pth and pth to obtain pth The phase of the complex signal in the domains MDCT-MDST of each frequency point of frame;Each frequency of pth frame is replaced using the amplitude of the corresponding frequency point of -2 frame of pth The amplitude of point;
The thermal compensation signal acquiring unit is specifically used for the phase of the complex signal in the domains MDCT-MDST according to each frequency point of pth frame With the amplitude of each frequency point of pth frame infer pth frame each frequency point MDCT coefficients.
45. device as claimed in claim 44, which is characterized in that described device further includes frequency point selecting unit, wherein:
The frequency point selecting unit, the frame types for being properly received frame according to the nearest c before current lost frames, selection are No each frequency point to current lost frames utilizes the phase and amplitude before current lost frames at each frequency point of several frames, into line Property or nonlinear extrapolation obtain the phase and amplitude of each frequency point of current lost frames.
46. a kind of frame losing compensation device of transform domain, which is characterized in that described device includes:Judging unit, wherein:
The judging unit, for by judging algorithm, selection uses claim 27~42 any or claim 43~ 45 any devices compensate current lost frames.
47. device as claimed in claim 46, it is characterised in that:
The judging unit is specifically used for judgment frame type, if current lost frames are tone frame, using claim 43~ 45 any devices compensate current lost frames;If current lost frames are non-pitch frame, any using claim 27~42 Device compensate current lost frames.
48. device as claimed in claim 47, it is characterised in that:
The judging unit, specifically for obtaining the preceding n frame type identifications for being properly received frame of current lost frames, if preceding n A number for being properly received frame medium pitch frame is more than the 11st threshold value n0, then it is assumed that current lost frames are tone frame;Otherwise it is assumed that Current lost frames are non-pitch frame, wherein 0≤n0≤ n, n >=1.
49. device as claimed in claim 47, it is characterised in that:
The judging unit is specifically used for calculating the spectrum flatness of frame, judges whether the value for composing flatness is less than the tenth threshold k, Then think that the frame is tone frame if it is less than K;Otherwise it is assumed that the frame is non-pitch frame, wherein 0≤K≤1.
50. device as claimed in claim 49, it is characterised in that:
The judging unit calculate compose flatness when, the frequency coefficient for calculating is original frequency after time-frequency domain variation Domain coefficient, or the frequency coefficient by original frequency domain coefficient after frequency spectrum shaping.
51. device as claimed in claim 47, it is characterised in that:
The judging unit is specifically used for using original frequency coefficient after time-frequency domain variation and by original frequency domain coefficient Frequency coefficient after frequency spectrum shaping calculates separately the spectrum flatness of frame, obtains the corresponding two spectrums flatness of frame;
Whether it is less than the tenth threshold k according to the value for one of obtaining spectrum flatness, sets whether the frame is tone frame;According to Whether the value of obtained other in which spectrum flatness is less than another threshold k ', reset whether the frame is tone frame;
Wherein, when the value for composing flatness is less than K, then frame is set as tone frame;Otherwise, frame is set as non-pitch frame, another When the value of a spectrum flatness is less than K ', it is tone frame to reset the frame;Wherein, 0≤K≤1,0≤K '≤1.
CN201210498677.3A 2012-11-29 2012-11-29 A kind of frame losing compensation method of transform domain and device Active CN103854649B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201210498677.3A CN103854649B (en) 2012-11-29 2012-11-29 A kind of frame losing compensation method of transform domain and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201210498677.3A CN103854649B (en) 2012-11-29 2012-11-29 A kind of frame losing compensation method of transform domain and device

Publications (2)

Publication Number Publication Date
CN103854649A CN103854649A (en) 2014-06-11
CN103854649B true CN103854649B (en) 2018-08-28

Family

ID=50862220

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201210498677.3A Active CN103854649B (en) 2012-11-29 2012-11-29 A kind of frame losing compensation method of transform domain and device

Country Status (1)

Country Link
CN (1) CN103854649B (en)

Families Citing this family (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108364657B (en) 2013-07-16 2020-10-30 超清编解码有限公司 Method and decoder for processing lost frame
CN106683681B (en) * 2014-06-25 2020-09-25 华为技术有限公司 Method and device for processing lost frame
FR3024582A1 (en) * 2014-07-29 2016-02-05 Orange MANAGING FRAME LOSS IN A FD / LPD TRANSITION CONTEXT
US9978400B2 (en) 2015-06-11 2018-05-22 Zte Corporation Method and apparatus for frame loss concealment in transform domain
CN107742521B (en) 2016-08-10 2021-08-13 华为技术有限公司 Coding method and coder for multi-channel signal
CN108922551B (en) * 2017-05-16 2021-02-05 博通集成电路(上海)股份有限公司 Circuit and method for compensating lost frame
CN107808655B (en) * 2017-10-27 2021-02-12 广州酷狗计算机科技有限公司 Audio signal processing method, audio signal processing device, electronic equipment and storage medium
CN108111702B (en) * 2017-12-07 2020-07-07 杭州闪目科技有限公司 Method for automatically compensating voice packet loss of VOIP system
CN111402904B (en) * 2018-12-28 2023-12-01 南京中感微电子有限公司 Audio data recovery method and device and Bluetooth device
CN110010145B (en) * 2019-02-28 2021-05-11 广东工业大学 Method for eliminating friction sound of electronic stethoscope
CN109994127B (en) * 2019-04-16 2021-11-09 腾讯音乐娱乐科技(深圳)有限公司 Audio detection method and device, electronic equipment and storage medium
CN113539278B (en) * 2020-04-09 2024-01-19 同响科技股份有限公司 Audio data reconstruction method and system
CN111653285B (en) * 2020-06-01 2023-06-30 北京猿力未来科技有限公司 Packet loss compensation method and device
CN113035207B (en) * 2021-03-03 2024-03-22 北京猿力未来科技有限公司 Audio processing method and device
CN113488068B (en) * 2021-07-19 2024-03-08 歌尔科技有限公司 Audio anomaly detection method, device and computer readable storage medium
CN113612808B (en) * 2021-10-09 2022-01-25 腾讯科技(深圳)有限公司 Audio processing method, related device, storage medium, and program product

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101231849A (en) * 2007-09-15 2008-07-30 华为技术有限公司 Method and apparatus for concealing frame error of high belt signal
CN101437009A (en) * 2007-11-15 2009-05-20 华为技术有限公司 Method for hiding loss package and system thereof
CN101471073A (en) * 2007-12-27 2009-07-01 华为技术有限公司 Package loss compensation method, apparatus and system based on frequency domain
CN101588341A (en) * 2008-05-22 2009-11-25 华为技术有限公司 Lost frame hiding method and device thereof
CN101958119A (en) * 2009-07-16 2011-01-26 中兴通讯股份有限公司 Audio-frequency drop-frame compensator and compensation method for modified discrete cosine transform domain
CN103065636A (en) * 2011-10-24 2013-04-24 中兴通讯股份有限公司 Voice frequency signal frame loss compensation method and device

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101231849A (en) * 2007-09-15 2008-07-30 华为技术有限公司 Method and apparatus for concealing frame error of high belt signal
CN101437009A (en) * 2007-11-15 2009-05-20 华为技术有限公司 Method for hiding loss package and system thereof
CN101471073A (en) * 2007-12-27 2009-07-01 华为技术有限公司 Package loss compensation method, apparatus and system based on frequency domain
CN101588341A (en) * 2008-05-22 2009-11-25 华为技术有限公司 Lost frame hiding method and device thereof
CN101958119A (en) * 2009-07-16 2011-01-26 中兴通讯股份有限公司 Audio-frequency drop-frame compensator and compensation method for modified discrete cosine transform domain
EP2442304A1 (en) * 2009-07-16 2012-04-18 ZTE Corporation Compensator and compensation method for audio frame loss in modified discrete cosine transform domain
CN103065636A (en) * 2011-10-24 2013-04-24 中兴通讯股份有限公司 Voice frequency signal frame loss compensation method and device

Also Published As

Publication number Publication date
CN103854649A (en) 2014-06-11

Similar Documents

Publication Publication Date Title
CN103854649B (en) A kind of frame losing compensation method of transform domain and device
US7930176B2 (en) Packet loss concealment for block-independent speech codecs
EP1157374B1 (en) Enhancing perceptual performance of sbr and related hfr coding methods by adaptive noise-floor addition and noise substitution limiting
JP5986199B2 (en) Method and apparatus for encoding and decoding audio signals
KR101770237B1 (en) Method, apparatus, and system for processing audio data
EP2357649A1 (en) Method and apparatus for decoding audio signal
KR101648290B1 (en) Generation of comfort noise
CN109754813B (en) Variable step size echo cancellation method based on rapid convergence characteristic
CN1335980A (en) Wide band speech synthesis by means of a mapping matrix
WO2013060223A1 (en) Frame loss compensation method and apparatus for voice frame signal
WO2010052749A1 (en) Noise suppression device
JP6301368B2 (en) Apparatus and method for generating a frequency enhancement signal using enhancement signal shaping
Soong et al. Optimal quantization of LSP parameters using delayed decisions
WO2013066244A1 (en) Bandwidth extension of audio signals
JP4006770B2 (en) Noise estimation device, noise reduction device, noise estimation method, and noise reduction method
US7363231B2 (en) Coding device, decoding device, and methods thereof
RU2742739C1 (en) Selection of pitch delay
JP5539992B2 (en) RATE CONTROL DEVICE, RATE CONTROL METHOD, AND RATE CONTROL PROGRAM
WO2006055354A2 (en) Adaptive time-based noise suppression
CN103065636B (en) The frame losing compensation method of voice frequency signal and device
JP6677110B2 (en) Audio signal processing device and audio signal processing program
CN117037808A (en) Voice signal processing method, device, equipment and storage medium
TWI544482B (en) Apparatus and method for generating a frequency enhancement signal using an energy limitation operation

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
EXSB Decision made by sipo to initiate substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant