Patent Description:
Due to the limitation of the number of bit rates for encoding speech signals and the influence of human auditory characteristics, low-frequency band information in a speech signal is always encoded first in an audio encoding algorithm. Compared with narrow-band speech, wide-band speech has the characteristics of being fuller and more natural; therefore, the acoustic quality can be improved by increasing the bandwidth for transmitting speech signals. When the number of bit rates for encoding speech signals is small, a bandwidth extension technology can be adopted to extend the bandwidth range of the speech signals and improve the quality of the speech signals.

In recent years, the bandwidth extension technology has developed significantly, and has found commercial applications in several fields, including acoustic enhancement of bass loudspeakers and high frequency enhancement of coded voice and audio.

Among current bandwidth extension methods, the encoding technology of low-frequency band information adopts existing encoding and decoding algorithms; and during the process of encoding and decoding high-frequency band information, a small number of bits are generally adopted to encode the high-frequency band information, and the high-frequency band information is recovered at a decoding end by using the correlation between the high-frequency and low-frequency bands.

However, it has become apparent that a transient signal has the following characteristics different from those of a non-transient signal: in the time domain, the signal energy of the transient signal has a large instant change; while in the frequency domain, the frequency spectrum of the transient signal is smooth. In the prior art, the time envelope of the transient signal is not modified, and due to the influence of the processing in the signal encoding process, such as process by frame by frame, time-frequency transform, and frequency envelope, the transient signal is likely to generate a pre-echo; therefore, the prior art has the disadvantage that the effect of the transient signal recovered at the decoding end is not satisfactory.

The article "<NPL> discloses a method to decrease the preceding quantizing noise below audibility by preprocessing an audio signal when sharp attacks occur.

The article "<NPL> discloses a novel approach to the pre-echo problem allowing to shape the quantization noise in time. The technique is shown to work efficiently also in the case of "pitched" signals (e.g. speech) where traditional block switching schemes do not offer an efficient solution.

The present invention is directed to a transient signal encoding method and device, and a computer-readable storage medium. The present invention is set out in the appended independent claims, with preferred embodiments being set out in the appended dependent claims.

According to the transient signal encoding method and device of the present invention, the time envelope is modified according to characteristics of the transient signal, such that the difference between the amplitude value of the time envelope having the maximal amplitude value and the amplitude values of the time envelopes of the other sub-frames before the sub-frame corresponding to the time envelope having the maximal amplitude value is more distinct, thereby improving the effect of recovery of the transient signal.

To make the technical solutions under the present invention clearer, the accompanying drawings for illustrating embodiments useful for understanding - but not covered by the subject-matter of the claims of - the present invention, or for illustrating the prior art, are outlined in the following. Apparently, the accompanying drawings are for the exemplary purpose only.

Technical solutions according to the embodiments useful for understanding - but not covered by the subject-matter of the claims of - the present invention will be clearly and completely described in the following with reference to the accompanying drawings.

<FIG> is a flow chart of a transient signal encoding method according to a first embodiment illustrative of - but not covered by-the present invention.

In Step <NUM>, a sub-frame where a time envelope having a maximal amplitude value (that is, a maximal time envelope) is located is obtained from time envelopes of all sub-frames of an input transient signal, in which the sub-frame is the reference sub-frame in the embodiments described herein.

When the number of bits for encoding an input signal is insufficient, a small number of bits are generally adopted to encode important information of high-frequency band During the process of encoding the high-frequency band information, when the number of available bits is constant, in order to better recover the high-frequency band information, the input signals may be classified, for example, the input signals may be classified into transient signals and non-transient signal, so as to adopt different encoding technologies for different types of signals. This embodiment mainly relates to processing of the transient signals.

A method for obtaining a time envelope includes: dividing an input signal into one or more sub-frames; obtaining energy information of each sub-frame, for example, the energy of each sub-frame and the square root of energy information of each sub-frame, to obtain the energy information; and schematically expressing waveform characteristics or amplitude trends of the input time-domain signal by using the obtained energy information.

After the time envelope of the transient signal is obtained, the time envelope may be modified according to the characteristics of the transient signal, such that in the modified time envelope, the difference between the amplitude values of time envelopes of the sub-frames included in the transient signal is more distinct, which is specifically represented in that the difference between the amplitude value of the time envelope having the maximal amplitude value and the amplitude values of other time envelopes is more distinct, so as to highlight the characteristics of the transient signal.

In Step <NUM>, an amplitude value of the time envelope of each sub-frame before the reference sub-frame is adjusted in such a way that a first difference is greater than a preset first threshold, in which the first difference is a difference between the amplitude value of the time envelope of each sub-frame before the reference sub-frame and the amplitude value of the maximal time envelope.

The first threshold may be determined by the following method: decreasing the amplitude value of the time envelope of each sub-frame before the reference sub-frame to <NUM>/<NUM> to <NUM>/<NUM> of the original amplitude value, obtaining a difference between the adjusted amplitude values of the time envelopes of the sub-frames and the amplitude value of the time envelope of the reference sub-frame, and using the difference as the first threshold.

In Step <NUM>, the adjusted time envelope is written into bitstream.

Based on the technical solution, the adjustment of the time envelope may further include: calculating an average amplitude value of the time envelopes of each sub-frame after the reference sub-frame; and adjusting the amplitude value of the time envelope of each sub-frame after the reference sub-frame in such a way that a second difference is greater than a preset second threshold when the average amplitude value is lower than or equal to a preset reference value, in which the second difference is a difference between the amplitude value of the time envelope of each sub-frame after the reference sub-frame and the amplitude value of the maximal time envelope.

The preset reference value may be selected to be <NUM>/<NUM> to <NUM>/<NUM> of the amplitude value of the time envelope of the reference sub-frame; and the second threshold may be determined by the following method: decreasing the amplitude value of the time envelope of each sub-frame after the reference sub-frame to <NUM>/<NUM> to <NUM>/<NUM> of the original amplitude value, obtaining a difference between the adjusted amplitude values of the time envelopes of the sub-frames and the amplitude value of the time envelope of the reference sub-frame, and using the difference as the second threshold.

After the amplitude value of the time envelope of each sub-frame other than the reference sub-frame is adjusted, the adjustment of the time-domain signal in the technical solution may further include:
adjusting the amplitude value of the time envelope of the reference sub-frame in such a way that an average energy of the adjusted time envelope of each sub-frame of the transient signal is greater than a preset third threshold.

The third threshold may be selected from the range satisfying the following condition: the average energy of the adjusted time envelope of each sub-frame of the transient signal is equivalent to the average energy of the adjusted time envelope of each sub-frame, for example, the former is <NUM> to <NUM> times the latter.

In order to improve the quality of the transient signal recovered at the decoding end, the time envelope corresponding to the transient signal needs to be encoded more finely. In this embodiment, during the process of finely encoding the time envelope corresponding to the transient signal, the time envelope of the transient signal can be modified according to the characteristics of the transient signal distinguished from the non-transient signal, such that the difference between the amplitude values of the time envelopes of the sub-frames included by the transient signal is more distinct, thereby improving the quality of the transient signal recovered at the decoding end.

In this embodiment, the time envelope of the transient signal is modified according to the characteristics of the transient signal, the difference between the amplitude values of the time envelopes of the sub-frames of the transient signal is enlarged, and the modified time envelope information is sent to the decoding end; and therefore, the position information of the transient signal is encoded and the encoded position information is sent to the decoding end without consuming any number of bits, that is, the technical effect of improving the quality of the transient signal recovered at the decoding end can be realized without increasing the number of bits required by the encoding end.

<FIG> is a flow chart of a transient signal encoding method according to a second embodiment useful for understanding - but not covered by the subject-matter of the claims of-the present invention.

In Step <NUM>, an input signal is decomposed into a low-frequency band signal and a high-frequency band signal; and as for the low-frequency band signal, Step <NUM> is performed, and as for the high-frequency band signal, Step <NUM> is performed.

In Step <NUM>, parameters of the low-frequency band signal in the input signal are input into a bitstream; and Step <NUM> is performed.

In this embodiment, the parameters of the low-frequency band signal (broadband signal) are input into the bitstream through an encoder.

In Step <NUM>, a signal type of the input signal (the high-frequency signal) is determined, and signal type information is input into the bitstream, in which the signal type information is configured to indicate whether the input signal (that is, the signal being currently encoded) is a transient signal or a non-transient signal.

In order to more accurately determine the signal type of the input signal, Step <NUM> may include Steps <NUM> to <NUM> (not shown).

In Step <NUM>, a long frame is formed with a preset number of consecutive frames in the high-frequency band signal, and an average energy of the long frame is calculated.

In a mode for forming the long frame, three consecutive frames including the current frame and two frames before the current frame are combined to form a long frame; or, three consecutive frames including the current frame, a frame before the current frame, and a frame after the current frame are combined to form a long frame; or, several other consecutive frames are combined to form a long frame. The average energy of the long frame may be calculated according to Formula (<NUM>): <MAT> where, <MAT>.

In Formula (<NUM>), gain is the average energy of the long frame; x[i] is a signal value of an ith sampling point of the time-domain signal; and N is the total number of sampling points of the whole long frame.

In Step <NUM>, the long frame is divided into several sub-frames, and an average energy of each sub-frame is calculated.

In this embodiment, it is assumed that each frame has a frame length of <NUM>, then the frame length of a long frame is <NUM>; the frame length of a long frame includes <NUM> sampling points, and if a long frame is divided into <NUM> sub-frames, the frame length of each sub-frame is <NUM> sampling points. An average energy sub_gain[i] of each sub-frame is calculated.

In Step <NUM>, a third difference and a fourth difference are calculated respectively, in which the third difference is a maximal difference between the average energy of each sub-frame and the average energy of the long frame, and the third difference is calculated according to Formula (<NUM>); and the fourth difference is a maximal difference between average energies of two consecutive sub-frames, and the fourth difference is calculated according to Formula (<NUM>).

In Formula (<NUM>), sub_gain[i] represents the average energy of each sub-frame, gain represents the average energy of the long frame, and max_deviation represents a maximal difference between the average energy of each sub-frame and the average energy of the long frame, that is, the third difference in the embodiments described herein.

In Formula (<NUM>), sub_gain[i] and sub_gain[i+<NUM>] represent the average energies of two consecutive sub-frames respectively, and max_rise represents a maximal difference between the average energies of two consecutive sub-frames in a long frame, that is, the fourth difference in the embodiments described herein.

In Step <NUM>, the average energy of the long frame is compared with a fourth threshold, the third difference is compared with a fifth threshold, and the fourth difference is compared with a sixth threshold, and if the average energy of the long frame is greater than the fourth threshold, the third difference is greater than the fifth threshold, and the fourth difference is greater than the sixth threshold (that is, Formula (<NUM>) is satisfied), it is determined that the high-frequency band signal is a transient signal; otherwise, it is determined that the high-frequency band signal is a non-transient signal.

In Formula (<NUM>), α1 represents the fourth threshold, α2 represents the fifth threshold; and α3 represents the sixth threshold. The values of α1, α2, and α3 are correlated to the amplitude of the input transient signal, and when the overall amplitude of the transient signal is large, the values of α1, α2, and α3 are large; and when the overall amplitude of the transient signal is small, the values of α1, α2, and α3 are small. For example, when the reference power level of the time envelope of the transient signal is -<NUM> dB, the values of α1, α2, and α3 are in the ranges of <NUM> < α1 < <NUM>, <NUM> < α2 < <NUM>, <NUM> < α3 < <NUM>.

In Step <NUM>, the obtained category information is input into a bitstream, and the category information includes transient signal information and non-transient signal information; and Step <NUM> is performed. As for a transient signal, Step <NUM> is performed; and as for a non-transient signal, the time envelope and the frequency-domain envelope of the non-transient signal can be obtained by using a method in the prior art, which will not be repeated herein.

It should be noted that, the method for classifying the input signal may be used in combination with the modification of the time envelope according to the present invention; moreover, when the time envelope of each sub-frame of the transient signal is not modified, the method for classifying the input signal may be used in combination with the method for encoding the transient signal in the prior art, and at this time, the accuracy of the identification of the transient signal can also be improved, thereby improving the effect of recovery of the transient signal at the decoding end.

In Step <NUM>, the time envelope of each sub-frame of the input signal is calculated respectively, and if the signal type of the input signal is a transient signal, Step <NUM> is performed; and if the signal type of the input signal is a non-transient signal, Step <NUM> is performed.

In Step <NUM>, the time envelope of the transient signal is modified.

In order to highlight the characteristics of the transient signal, the time envelope of the transient signal is modified, for example, modification of increasing the amplitude value is performed on the time envelope having the maximal amplitude value, and/or, modification of decreasing the amplitude value is performed on other time envelopes. Specifically, Step <NUM> may include Step <NUM> to Step <NUM>. <FIG> is a block diagram of an embodiment of an encoding end modifying a time envelope of a transient signal according to the second embodiment useful for understanding - but not covered by the subject-matter of the claims of - the present invention. As shown in <FIG>, the modification performed on the time envelope of the transient signal includes Step <NUM> to Step <NUM>.

In Step <NUM>, the time envelope of each sub-frame of the transient signal is calculated, so as to obtain the time envelope tEnv[i] of each sub-frame.

In Step <NUM>, by searching in the time envelopes of the sub-frames obtained in Step <NUM>, a sub-frame where the maximal time envelope is located and position information corresponding to the sub-frame are obtained, in which the sub-frame is the reference sub-frame in the embodiments of the present invention, and for the convenience of illustration, the position information of the reference sub-frame is represented as pos in the following.

In Step <NUM>, the position information (i) of the current sub-frame is compared with the position information (pos) of the reference sub-frame, and if the current sub-frame is before the reference sub-frame (that is, i<pos), Step <NUM> is performed; otherwise, Step <NUM> is performed.

In Step <NUM>, modification of decreasing the amplitude value is performed on the time envelope of the current sub-frame, so as to obtain a first modified envelope, and Step <NUM> is performed. The proportion by which the amplitude value is decreased may be determined according to the difference between the amplitude values of the time envelopes corresponding to the sub-frames and the amplitude value of the time envelope corresponding to the reference sub-frame, and if the difference is large, a small proportion by which the amplitude value is decreased may be selected; otherwise, a large proportion by which the amplitude value is decreased may be selected. <FIG> shows modification of dividing the value of the time envelope of the current sub-frame by <NUM>, such that the modified time envelope (that is, the first modified envelope in the embodiments of the present invention) of the current sub-frame is decreased to be <NUM>/<NUM> of the time envelope before modification, that is: <MAT> where, tEnv[i]' represents the modified time envelope of the current sub-frame, and tEnv[i] represents the time envelope of the current sub-frame before modification.

In Step <NUM>, an average value <MAT> of the time envelope of each sub-frame after the reference sub-frame is calculated: <MAT>.

In Step <NUM>, the average value <MAT> of the time envelope of each sub-frame after the reference sub-frame is compared with a preset reference value, in which the preset reference value in this embodiment is <NUM>/<NUM> of the time envelope corresponding to the reference sub-frame, that is, <MAT>, and if <MAT>, Step <NUM> is performed; otherwise, the time envelope of the current sub-frame is not modified, and Step <NUM> is performed. If the difference between the average value of the time envelope of each sub-frame after the reference sub-frame and the preset reference value is large, it indicates that the reference sub-frame corresponding to the maximal time envelope of the original signal is abruptly changed with respect to the sub-frame thereafter; and in order to enable the recovered signal to meet the original characteristics, the sub-frames may be modified. If the difference between the average value of the time envelope of each sub-frame after the reference sub-frame and the preset reference value is small, it indicates that the reference sub-frame corresponding to the maximal time envelope of the original signal is not abruptly changed with respect to the sub-frame thereafter, and at this time, the sub-frames may not be modified. Preferably, the preset reference value is <NUM>/<NUM> to <NUM>/<NUM> of the maximal time envelope of the transient signal.

In Step <NUM>, the position information of the current sub-frame is compared with the position information of the reference sub-frame, so as to determine whether the current sub-frame is the reference sub-frame, and if yes, Step <NUM> is performed; otherwise, Step <NUM> is performed.

In Step <NUM>, modification of increasing the amplitude value is performed on the time envelope corresponding to the reference sub-frame, so as to obtain a second modified envelope; and Step <NUM> is performed.

<FIG> shows modification of multiplying the value of the time envelope of the current sub-frame by <MAT>, such that the modified time envelope (that is, the second modified envelope in the embodiments of the present invention) of the reference sub-frame is increased to be <MAT> times the time envelope before modification, that is: <MAT> where, tEnv[pos]' represents the modified time envelope of the reference sub-frame, and tEnv[pos] represents the time envelope of the reference sub-frame before modification.

In Step <NUM>, modification of decreasing the amplitude value is performed on the time envelope of the current sub-frame, so as to obtain a third modified envelope, and Step <NUM> is performed. The proportion by which the amplitude value is decreased may be determined according to the difference between the amplitude values of the time envelopes corresponding to the sub-frames and the amplitude value of the time envelope corresponding to the reference sub-frame, and if the difference is large, a small proportion by which the amplitude value is decreased may be selected; otherwise, a large proportion by which the amplitude value is decreased may be selected.

<FIG> shows modification of dividing the value of the time envelope of the current sub-frame by <NUM>, such that the modified time envelope (that is, the third modified envelope in the embodiments of the present invention) of the current sub-frame is decreased to be <NUM>/<NUM> of the time envelope before modification, that is: <MAT> where, tEnv[i]' represents the modified time envelope of the current sub-frame, and tEnv[i] represents the time envelope of the current sub-frame before modification.

In Step <NUM>, the first modified envelope obtained in Step <NUM>, the second modified envelope obtained in Step <NUM>, and the third modified envelope obtained in Step <NUM> are combined, to obtain the modified time envelope of the transient signal.

Through Step <NUM> to Step <NUM>, the modification of the time envelope of the transient signal is completed, and the modified time envelope of the transient signal is obtained.

In Step <NUM>, time-frequency transform is performed on the high-frequency band signal in the input signal, so as to obtain a frequency-domain signal of the high-frequency band signal.

When the frequency-domain envelope of the transient signal is obtained, the time-domain signal corresponding to the transient signal is transformed to the frequency domain through a transform method such as fast Fourier transform (FFT) and modified discrete cosine transform (MDCT), so as to obtain the frequency-domain signal corresponding to the transient signal in the frequency domain.

No limitation is imposed on the time sequence of Step <NUM> and Step <NUM>.

In Step <NUM>, the frequency-domain envelope of each sub-band of the frequency-domain signal is calculated, so as to obtain the frequency-domain envelope of the high-frequency band signal.

The frequency-domain envelope in the embodiments described herein refers to:
dividing the frequency-domain signal into one or more sub-bands, obtaining energy information of each sub-band or obtaining the square root of the energy information of each sub-band, and schematically expressing spectral waveform characteristics or amplitude trends of the frequency-domain signal by using the obtained energy information or the obtained square root of the energy information. Therefore, the frequency-domain signal is divided into one or more sub-bands, and the energy information of each sub-band or the square root of the energy information of each sub-band is obtained, and the frequency-domain envelope of each sub-band of the frequency-domain signal is obtained by using the obtained energy information or the obtained square root of the energy information.

In Step <NUM>, the obtained frequency-domain envelope of the high-frequency band signal is quantified, and then is added in the bitstream; and Step <NUM> is performed.

In Step <NUM>, the bitstream added with the parameters of the low-frequency band signal, the signal type information of the high-frequency band signal, the frequency-domain envelope and the modified time envelope are sent to the decoding end, in which the signal type information is configured to indicate whether the signal being currently encoded is a transient signal or a non-transient signal, such that the decoding end can determine the type of the decoded current signal according to the signal type information.

In this embodiment, when the signal type of the current high-frequency band signal is determined, identification of the transient signal is performed by combining information of several consecutive frames in the high-frequency band signal, and therefore, the accuracy of the identification of the transient signal is improved, and the transient signal can be separated from the input high-frequency band signal more accurately; moreover, in this embodiment, the time envelope corresponding to the separated transient signal is modified, such that the difference between the amplitude values of the time envelopes of the sub-frame of the transient signal is more distinct, thereby improving the quality of the transient signal recovered at the decoding end.

<FIG> is a flow chart of a transient signal decoding method according to a third embodiment useful for understanding - but not covered by the subject-matter of the claims of-the present invention.

In Step <NUM>, a sub-frame where a time envelope having a maximal amplitude value (that is, a maximal time envelope) is located is obtained from time envelopes of all sub-frames of a pre-obtained signal having a signal type of a transient signal, in which the sub-frame is the reference sub-frame described in the embodiments described herein.

The modification of the time envelope of the transient signal may be performed at the encoding end or the decoding end. In this embodiment, the time envelope is modified according to the characteristics of the transient signal at the decoding end, such that in the modified time envelope, the difference between the amplitude value of the time envelope having the maximal amplitude value of the sub-frames of the transient signal and the amplitude values of other time envelopes is more distinct, so as to highlight the characteristics of the transient signal.

In Step <NUM>, a pre-obtained time-domain signal is modified according to the adjusted time envelope, so as to obtain a recovered transient signal.

The bitstream from the encoding end is decoded, to obtain the frequency-domain envelope of each sub-band of the signal having a signal type of a transient signal. A frequency-domain excitation signal is obtained from normalized low-frequency-band frequency-domain signals or random noises, a frequency-domain signal is generated according to the frequency-domain excitation signal and the frequency-domain envelope, and frequency-time transform is performed on the frequency-domain signal to obtain the time-domain signal. Then, the time-domain signal is modified according to the modified time envelope, such that the transient signal is recovered at the decoding end.

In this embodiment, the time envelope of the transient signal is modified at the decoding end, such that in the modified time envelope, the difference between the amplitude value of the time envelope having the maximal amplitude value and the amplitude values of other time envelopes is more distinct, so as to highlight the characteristics of the transient signal, thereby improving the quality of the transient signal recovered at the decoding end.

<FIG> is a flow chart of a transient signal decoding method according to a fourth embodiment useful for understanding - but not covered by the subject-matter of the claims of-the present invention.

In Step <NUM>, a bitstream from an encoding end is decoded, to obtain a time envelope and signal type information of a high-frequency band signal, and if the signal type is a transient signal, Step <NUM> is performed; and if the signal type is a non-transient signal, Step <NUM> is performed.

In Step <NUM>, when the obtained signal type information indicates that the signal type is a transient signal, the time envelope is modified, so as to obtain a modified time envelope; and Step <NUM> is performed.

In order to highlight the characteristics of the transient signal, when the current signal type is a transient signal, the time envelope is modified: modification of increasing the amplitude value is performed on the time envelope having the maximal amplitude value, and/or, modification of decreasing the amplitude value is performed on other time envelopes. Step <NUM> may include Step <NUM>-Step <NUM>. <FIG> is a block diagram of an embodiment of a decoding end modifying a time envelope of a transient signal according to the fourth embodiment useful for understanding - but not covered by the subject-matter of the claims of - the present invention. As shown in <FIG>, when the current signal type is a transient signal, the modification performed on the time envelope by the decoding end includes Step <NUM> to Step <NUM>.

In Step <NUM>, the bitstream from the encoding end is decoded, to obtain a time envelope of each sub-frame of the high-frequency band signal and signal type information. If the signal type information indicates that the type of the current signal in the bitstream is a transient signal, Step <NUM> is performed, to modify the time envelope; and if the signal type information indicates that the type of the current signal in the bitstream is a non-transient signal, the signal is decoded by using a decoding method in the prior art to recover the non-transient signal, which will not be repeated herein.

In Step <NUM>, by searching in the time envelopes of the sub-frames obtained in Step <NUM>, a sub-frame where the maximal time envelope is located and position information corresponding to the sub-frame are obtained, in which the sub-frame is the reference sub-frame in the embodiments described herein, and for the convenience of illustration, the position information of the reference sub-frame is represented as pos in the following.

In Step <NUM>, modification of decreasing the amplitude value is performed on the time envelope of the current sub-frame, so as to obtain a first modified envelope, and Step <NUM> is performed.

For example, modification of dividing the value of the time envelope of the current sub-frame by <NUM> is adopted, such that the modified time envelope (that is, the first modified envelope in the embodiments of the present invention) of the current sub-frame is decreased to be <NUM>/<NUM> of the time envelope before modification, that is: <MAT> where, tEnv[i]' represents the modified time envelope of the current sub-frame, and tEnv[i] represents the time envelope of the current sub-frame before modification.

In Step <NUM>, the average value <MAT> of the time envelope of each sub-frame after the reference sub-frame is compared with a preset reference value, in which the preset reference value in this embodiment is <NUM>/<NUM> of the time envelope corresponding to the reference sub-frame, that is, <MAT>, and if <MAT>, Step <NUM> is performed; otherwise, the time envelope of the current sub-frame is not modified, and Step <NUM> is performed.

For example, modification of multiplying the value of the time envelope of the current sub-frame by <MAT> is performed, such that the modified time envelope (that is, the second modified envelope in the embodiments described herein) of the reference sub-frame is increased to be <MAT> times the time envelope before modification, that is: <MAT> where, tEnv[pos]' represents the modified time envelope of the reference sub-frame, and tEnv[pos] represents the time envelope of the reference sub-frame before modification.

In Step <NUM>, modification of decreasing the amplitude value is performed on the time envelope of the current sub-frame, so as to obtain a third modified envelope, and Step <NUM> is performed.

For example, modification of dividing the value of the time envelope of the current sub-frame by <NUM> is adopted, such that the modified time envelope (that is, the third modified envelope in the embodiments of the present invention) of the current sub-frame is decreased to be <NUM>/<NUM> of the time envelope before modification, that is: <MAT> where, tEnv[i]' represents the modified time envelope of the current sub-frame, and tEnv[i] represents the time envelope of the current sub-frame before modification.

In Step <NUM>, the first modified envelope obtained in Step <NUM>, the second modified envelope obtained in Step <NUM>, the third modified envelope obtained in Step <NUM>, and the time envelope that does not meet the modification conditions in Step <NUM> and is not subjected to time-domain modification are combined, to obtain the modified time envelope of the transient signal.

In Step <NUM>, the bitstream from the encoding end is decoded, to obtain the low-frequency band signal; and Step <NUM> is performed.

In this embodiment, the low-frequency band signal in the bitstream is decoded by a decoder.

In Step <NUM>, a frequency-domain excitation signal of the high-frequency band signal is generated.

The frequency-domain excitation signal of the high-frequency band signal is obtained from normalized low-frequency-band frequency-domain signals or random noises.

In Step <NUM>, the bitstream from the encoding end is decoded, to obtain the frequency-domain envelope of each sub-band of the high-frequency band signal.

In Step <NUM>, the frequency-domain excitation signal is modified by using the frequency-domain envelope of each sub-band of the high-frequency band signal.

The objective of the modification is to enable the energy of the recovered frequency spectrum to be equivalent to the energy of the real high-frequency band spectrum.

In Step <NUM>, a high-frequency-band frequency-domain signal is generated according to the modified frequency-domain excitation signal; and the high-frequency-band frequency-domain signal may be calculated according to Formula (<NUM>): <MAT>.

In Formula (<NUM>), exc[i] represents the frequency-domain excitation signal; fEnv[j] represents the frequency-domain envelope; and spectrum[i] represents the high-frequency-band frequency-domain signal.

In Step <NUM>, frequency-time transform is performed on the generated high-frequency-band frequency-domain signal.

In Step <NUM>, the time-domain signal is generated. If the type of the high-frequency band signal is a transient signal, Step <NUM> is performed, and if the high-frequency band signal is a non-transient signal, Step <NUM> is performed.

In Step <NUM>, the time-domain signal having a signal type of a transient signal is adjusted, to obtain the adjusted time-domain signal signal'[i].

A preset number of sampling points in the reference sub-frame are selected; and signal amplitude of each of the selected sampling points is adjusted in such a way that a fifth difference is greater than a seventh threshold, in which the fifth difference is a difference between the signal amplitude value of each of the selected sampling points and a maximal amplitude value of the reference sub-frame.

The seventh threshold may be selected from the following range: decreasing the amplitudes of the selected sampling points to be <NUM>/<NUM> of the original amplitudes, and obtaining the differences between the adjusted amplitudes of the sampling points and the maximal amplitude among the amplitudes of the sampling points included in the reference sub-frame.

A preset number of sampling points included in the sub-frame where the time envelope having the maximal amplitude value is located are selected, and the signal amplitudes of the sampling points are decreased, so as to adjust the time-domain signal. The specific method for adjustment of the time-domain signal and the preset number of sampling points required to be adjusted are mainly dependent upon the characteristics of the original input signal.

For example, during the adjustment of the time-domain signal, a preset number of sampling points included in the sub-frame where the time envelope having the maximal amplitude value is located are selected sequentially, for example, the sampling points in the first <NUM>/<NUM> sub-frame length included in the time-domain signal corresponding to the reference sub-frame where the time envelope having the maximal amplitude value is located are selected, and the amplitude values of the selected sampling points are divided by <NUM>. If a number of bits can be used for transmitting flag information at the encoding end and the decoding end, these bit positions can be used to carry the flag information to the decoding end, for example, when the encoding end has a bit for transmitting the flag information, the decoding end can determine whether to adjust the preset number of sampling points according to the flag bit; when the encoding end has multiple bit positions for carrying the flag information, the decoding end can determine which sampling points need to be adjusted according to the received flag bits; and when the encoding end has sufficient bit positions for carrying the flag information, the decoding end can determine whether each sampling point needs to be adjusted according to the received flag information.

It should be noted that, the method for adjusting the time-domain signal may be used in combination with the modification of the time envelope according to the present invention; moreover, when the time envelope of each sub-frame of the transient signal is not modified, the method for adjusting the time-domain signal may be used in combination with the method for encoding the transient signal in the prior art, and at this time, the characteristics of the transient signal can also be highlighted, thereby improving the effect of recovery of the transient signal.

In Step <NUM>, the obtained time-domain signal signal'[i] is normalized.

In Step <NUM>, by using the modified time envelope obtained in Step <NUM>, the normalized time-domain signal having a signal type of a transient signal is modified, so as to obtain a recovered transient signal; and by using the time envelope signal having a signal type of non-transient signal obtained in Step <NUM>, the corresponding time-domain signal is modified, so as to obtain a recovered non-transient signal.

The normalized time-domain signal having a signal type of a transient signal may be modified according to Formula (<NUM>): <MAT>.

In Formula (<NUM>), signal'[i] represents the modified time-domain signal; tEnv[j] represents the modified time envelope; tEnv[j]' represents the time envelope of the modified time-domain signal (signal'[i]); and signal[i] represents the time-domain signal of the high-frequency band signal.

In Step <NUM>, the recovered low-frequency band signal and high-frequency band signal are combined, to obtain the output wide-frequency band signal, in which the recovered high-frequency band signal includes the recovered transient signal and the recovered non-transient signal.

In this embodiment, no limitation is imposed on the time sequence of Step <NUM>, Step <NUM>, and Step <NUM>.

In this embodiment, the time envelope corresponding to the transient signal in the high-frequency band signal obtained through decoding at the decoding end is modified, such that the difference between the amplitude values of the time envelopes of all sub-frames corresponding to the transient signal is more distinct, thereby improving the quality of the transient signal recovered at the decoding end; moreover, in this embodiment, before the time-domain signal is modified by using the time envelope, the amplitudes of the sampling points before the time-domain signal of the sub-frame having the maximal time envelope are decreased, so as to highlight the characteristics of the transient signal, thereby significantly improving the output effect of the transient signal in the output signal.

<FIG> is a schematic structural view of a transient signal encoding device according to a fifth embodiment useful for understanding - but not covered by the subject-matter of the claims of-the present invention. As shown in <FIG>, the transient signal encoding device of this embodiment includes: a reference sub-frame obtaining module <NUM>, a first amplitude value adjusting module <NUM>, and a bitstream writing module <NUM>.

The reference sub-frame obtaining module <NUM> is configured to obtain a reference sub-frame where a time envelope having a maximal amplitude value (that is, a maximal time envelope) is located from time envelopes of all sub-frames of an input transient signal.

The first amplitude value adjusting module <NUM> is configured to adjust an amplitude value of the time envelope of each sub-frame before the reference sub-frame in such a way that a first difference is greater than a preset first threshold, in which the first difference is a difference between the amplitude value of the time envelope of each sub-frame before the reference sub-frame and the amplitude value of the maximal time envelope. The first threshold may be determined by the following method: decreasing the amplitude value of the time envelope of each sub-frame before the reference sub-frame to <NUM>/<NUM> to <NUM>/<NUM> of the original amplitude value, obtaining a difference between the adjusted amplitude values of the time envelopes of the sub-frames and the amplitude value of the time envelope of the reference sub-frame, and using the difference as the first threshold.

The bitstream writing module <NUM> is configured to write the adjusted time envelope into bitstream.

Based on the technical solution, the transient signal encoding device of this embodiment further includes: an average amplitude value calculation module <NUM>, a second amplitude value adjusting module <NUM>, and a third amplitude value adjusting module <NUM>.

The average amplitude value calculation module <NUM> is configured to calculate an average amplitude value of the time envelopes of each sub-frame after the reference sub-frame.

The second amplitude value adjusting module <NUM> is configured to adjust the amplitude value of the time envelope of each sub-frame after the reference sub-frame in such a way that a second difference is greater than a preset second threshold when the average amplitude value is lower than or equal to a preset reference value, in which the second difference is a difference between the amplitude value of the time envelope of each sub-frame after the reference sub-frame and the amplitude value of the maximal time envelope. The preset reference value may be selected to be <NUM>/<NUM> to <NUM>/<NUM> of the amplitude value of the time envelope of the reference sub-frame; and the second threshold may be determined by the following method: decreasing the amplitude value of the time envelope of each sub-frame after the reference sub-frame to <NUM>/<NUM> to <NUM>/<NUM> of the original amplitude value, obtaining a difference between the adjusted amplitude values of the time envelopes of the sub-frames and the amplitude value of the time envelope of the reference sub-frame, and using the difference as the second threshold.

The third amplitude value adjusting module <NUM> is configured to adjust an amplitude value of the time envelope of the reference sub-frame in such a way that an average energy of the adjusted time envelope of each sub-frame of the transient signal is greater than a preset third threshold, after the amplitude value of the time envelope of each sub-frame other than the reference sub-frame is adjusted. The third threshold may be selected from the range satisfying the following condition: the average energy of the adjusted time envelope of each sub-frame of the transient signal is equivalent to the average energy of the adjusted time envelope of each sub-frame, for example, the former is <NUM> to <NUM> times the latter.

In this embodiment, during the process of finely encoding the time envelope corresponding to the transient signal, the first amplitude value adjusting module can modify the time envelope of the transient signal according to the characteristics of the transient signal, such that the difference between the amplitude values of the time envelopes of the sub-frames included by the transient signal is more distinct, thereby improving the quality of the transient signal recovered at the decoding end.

<FIG> is a schematic structural view of a transient signal encoding device according to a sixth embodiment useful for understanding - but not covered by the subject-matter of the claims of-the present invention. Different from the embodiment in <FIG>, the transient signal encoding device of this embodiment further includes a signal type determination module <NUM>.

The signal type determination module <NUM> is configured to determine a signal type of the input signal, and write signal type information in the encoding bitstream, in which the signal type includes a transient signal or a non-transient signal.

The signal type determination module <NUM> may include a long frame average energy calculation unit <NUM>, a sub-frame average energy calculation unit <NUM>, a difference calculation unit <NUM>, and a signal type determination unit <NUM>.

The long frame average energy calculation unit <NUM> is configured to form a long frame with a preset number of consecutive frames in the input signal and calculate an average energy of the long frame.

The sub-frame average energy calculation unit <NUM> is configured to divide the long frame into multiple sub-frames and calculate an average energy of each sub-frame.

The difference calculation unit <NUM> is configured to calculate a third difference and a fourth difference respectively, in which the third difference is a maximal difference between the average energy of each sub-frame and the average energy of the long frame, and the fourth difference is a maximal difference between average energies of two consecutive sub-frames.

The signal type determination unit <NUM> is configured to determine that the input signal is a transient signal when the average energy of the long frame is greater than a fourth threshold, the third difference is greater than a fifth threshold, and the fourth difference is greater than a sixth threshold; otherwise, determine that the input signal is a non-transient signal.

<FIG> is a schematic structural view of a transient signal decoding device according to a seventh embodiment useful for understanding - but not covered by the subject-matter of the claims of - the present invention. As shown in <FIG>, the transient signal encoding device of this embodiment includes: a reference sub-frame obtaining module <NUM>, a first amplitude value adjusting module <NUM>, and a time-domain signal modification module <NUM>.

The reference sub-frame obtaining module <NUM> is configured to obtain a reference sub-frame where a time envelope having a maximal amplitude value (that is, a maximal time envelope) is located from time envelopes of all sub-frames of a pre-obtained signal having a signal type of a transient signal.

The first amplitude value adjusting module <NUM> is configured to adjust an amplitude value of the time envelope of each sub-frame before the reference sub-frame in such a way that a first difference is greater than a preset first threshold, in which the first difference is a difference between the amplitude value of the time envelope of each sub-frame before the reference sub-frame and the amplitude value of the maximal time envelope.

The time-domain signal modification module <NUM> is configured to modify a pre-obtained time-domain signal according to the adjusted time envelope, so as to obtain a recovered transient signal.

In this embodiment, the time envelope of the transient signal is modified by the time envelope modification module at the decoding end, such that in the modified time envelope, the difference between the amplitude value of the time envelope having the maximal amplitude value and the amplitude values of other time envelopes is more distinct, so as to highlight the characteristics of the transient signal, thereby improving the quality of the transient signal recovered at the decoding end.

<FIG> is a schematic structural view of a transient signal decoding device according to an eighth embodiment useful for understanding - but not covered by the subject-matter of the claims of - the present invention. Different from the embodiment in <FIG>, the transient signal decoding device of this embodiment further includes: an average amplitude value calculation module <NUM>, a second amplitude value adjusting module <NUM>, and a third amplitude value adjusting module <NUM>.

The second amplitude value adjusting module <NUM> is configured to adjust the amplitude value of the time envelope of each sub-frame after the reference sub-frame in such a way that a second difference is greater than a preset second threshold when the average amplitude value is lower than or equal to a preset reference value, in which the second difference is a difference between the amplitude value of the time envelope of each sub-frame after the reference sub-frame and the amplitude value of the maximal time envelope.

The third amplitude value adjusting module <NUM> is configured to adjust an amplitude value of the time envelope of the reference sub-frame in such a way that an average energy of the adjusted time envelope of each sub-frame of the transient signal is greater than a preset third threshold, after the amplitude value of the time envelope of each sub-frame other than the reference sub-frame is adjusted.

Based on the technical solution, the transient signal decoding device of this embodiment may further include a time-domain signal adjusting module <NUM>.

The time-domain signal adjusting module <NUM> is configured to select a preset number of sampling points in the reference sub-frame, and adjust signal amplitude of each of the selected sampling points in such a way that a fifth difference is greater than a seventh threshold, in which the fifth difference is a difference between the signal amplitude value of each of the selected sampling points and a maximal amplitude value of the reference sub-frame.

<FIG> is a schematic structural view of a transient signal processing system according to a ninth embodiment useful for understanding - but not covered by the subject-matter of the claims of - the present invention. As shown in <FIG>, the transient signal processing system includes a transient signal encoding device <NUM> and a transient signal decoding device <NUM>.

The modification of the time envelope of the transient signal may be performed at the encoding end.

The transient signal encoding device <NUM> is configured to obtain a reference sub-frame where a time envelope having a maximal amplitude value (that is, a maximal time envelope) is located from time envelopes of all sub-frames of an input transient signal, adjust an amplitude value of the time envelope of each sub-frame before the reference sub-frame in such a way that a first difference is greater than a preset first threshold, and write the adjusted time envelope into bitstream, in which the first difference is a difference between the amplitude value of the time envelope of each sub-frame before the reference sub-frame and the amplitude value of the maximal time envelope.

The transient signal decoding device <NUM> is configured to modify a pre-obtained time-domain signal according to the time envelope in the received bitstream, so as to obtain a recovered transient signal.

In this embodiment, the time envelope of the transient signal is modified at the encoding end, and the difference between the amplitude value of the time envelope having the maximal amplitude value among the time envelopes of all sub-frames of the transient signal and the amplitude values of other time envelopes is enlarged, so as to highlight the characteristics of the transient signal, thereby improving the quality of the transient signal recovered at the decoding end.

In the transient signal processing system of this embodiment, as for the specific detailed structure of the transient signal encoding device <NUM>, reference can be made to the description of the embodiments in <FIG> and <FIG>, and as for the specific principle of the modification of the time envelope of the transient signal, reference can be made to the description of the embodiments in <FIG>, which will not be repeated herein.

Alternatively, the modification of the time envelope of the transient signal may be performed at the decoding end.

The transient signal encoding device <NUM> is configured to write a time envelope of each sub-frame of a transient signal in a bitstream.

The transient signal decoding device <NUM> is configured to obtain a reference sub-frame where a maximal time envelope having a maximal amplitude value is located from time envelopes of all sub-frames of a signal in the received bitstream, adjust an amplitude value of the time envelope of each sub-frame before the reference sub-frame in such a way that a first difference is greater than a preset first threshold, and modify a pre-obtained time-domain signal according to the adjusted time envelope to obtain a recovered transient signal, in which the first difference is a difference between the amplitude value of the time envelope of each sub-frame before the reference sub-frame and the amplitude value of the maximal time envelope.

In this embodiment, the time envelope of the transient signal is modified at the decoding end, and the difference between the amplitude value of the time envelope having the maximal amplitude value among the time envelopes of all sub-frames of the transient signal and the amplitude values of other time envelopes is enlarged, so as to highlight the characteristics of the transient signal, thereby improving the quality of the transient signal recovered at the decoding end.

In the transient signal processing system of this embodiment, as for the specific detailed structure of the transient signal decoding device <NUM>, reference can be made to the description of the embodiments in <FIG>, and as for the specific principle of the modification of the time envelope of the transient signal, reference can be made to the description of the embodiments in <FIG>, which will not be repeated herein.

It should be understood by persons of ordinary skill in the art that the accompanying drawings are merely schematic views of embodiments useful for understanding - but not covered by the subject-matter of the claims of-the present invention.

It should be understood by persons of ordinary skill in the art that modules in a device according to an embodiment may be distributed in the device of the embodiment according to the description of the embodiment, or correspondingly disposed in one or more devices different from this embodiment. The modules of the above embodiment may be combined into one module, or further divided into multiple sub-modules.

The sequence numbers of the above embodiments are merely for the convenience of description, and do not imply the preference among the embodiments.

Persons of ordinary skill in the art should understand that all or a part of the steps of the method according to the embodiments of the present invention may be implemented by a program instructing relevant hardware. The program may be stored in a computer readable storage medium. When the program is run, the steps of the method according to the embodiments of the present invention are performed. The storage medium may be any medium that is capable of storing program codes, such as a ROM, a RAM, a magnetic disk, and an optical disk.

Claim 1:
A transient signal encoding method for speech signals or audio signals, comprising:
decomposing an input signal into a low-frequency band signal and a high-frequency band signal;
classifying the high-frequency band signal into a transient signal or a non-transient signal;
only when the high-frequency band signal is classified as a transient signal, obtaining (<NUM>) a reference sub-frame where a maximal time envelope having a maximal amplitude value from time envelopes of all sub-frames of the high-frequency band signal is located;
only when the high-frequency band signal is classified as a transient signal, decreasing (<NUM>) an amplitude value of the time envelope of each sub-frame before the reference sub-frame; and
only when the high-frequency band signal is classified as a transient signal, writing (<NUM>) the adjusted time envelope obtained by the decreasing step into an encoding bitstream; and
obtaining a frequency-domain envelope of the high-frequency band signal wherein the frequency-domain envelope of the high-frequency band signal is added to the encoding bitstream.