Signal classification method and signal classification device
Patent Information
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- HUAWEI TECH CO LTD
- Filing Date
- 2024-10-10
- Publication Date
- 2026-04-17
AI Technical Summary
The prior art has inaccuracy in the classification of high-band signals, and relying solely on the characteristic parameters of high-band signals leads to incorrect classification results.
By dividing the current frame into low-band and high-band signals, the signal category is judged using preset encoding/decoding feature parameters, and the characteristic parameters of the high-band signal are adjusted according to the energy attenuation value, to achieve more accurate signal classification.
Improve the accuracy of signal classification, reduce misclassification, improve encoding/decoding performance, and improve user experience.
Smart Images

Figure 00000000_0000_ABST
Abstract
Description
[Technical field]
[0001] This application claims priority to Chinese Patent Application No. 201110138461.1, entitled “SIGNAL CLASSIFICATION METHOD AND DEVICE, AND ENCODING AND DECODING METHODS AND DEVICES”, filed with the State Intellectual Property Office of the People's Republic of China on May 25, 2011, which is incorporated herein by reference in its entirety.
[0002] The present invention relates to the field of speech and audio technology, in particular to a signal classification method and device, as well as to an encoding and decoding method and device. [Background technology]
[0003] In audio and speech processing technology, bandwidth extension technology has already emerged, that is, high frequency band signals are encoded using a small number of bits to extend the frequency band range of the speech / audio signal. Bandwidth extension technology has been rapidly developed in recent years, and has even been commercially applied in some encoders and decoders.
[0004] The currently adopted bandwidth extension technology is basically a multi-mode bandwidth extension technology, in which the signal class of the high frequency band signal is determined according to the signal characteristics of the high frequency band signal in the input signal, and different encoding algorithms and different decoding algorithms are adopted for different signal classes. According to the signal characteristics of the high frequency band signal, the high frequency band signal is classified into four classes, namely, a transition class, a harmonic class, a noise class, and a normal class. A specific classification process includes the steps of: dividing a high frequency band time domain signal of a frame into several subframes, obtaining the time domain envelope of each subframe, and determining that the high frequency band signal of the frame is a transition class if the energy of a certain subframe is greater than a certain multiple of the energy of the previous subframe and the energy of the subframe is greater than a certain multiple of the average energy of all subframes in the entire frame; if the frame is not a transition class, dividing the high frequency band frequency domain signal of the frame into several subbands, and obtaining the peak of each subband. The method includes steps of obtaining a peak-to-average ratio of the subband, where the peak-to-average ratio is the ratio of the peak energy or amplitude of the subband to the average energy or amplitude of the subband, and determining that the high-frequency band signal of the frame is of a harmonic class if the number of subbands having a peak-to-average ratio higher than a certain threshold is greater than a certain number, determining that the high-frequency band signal of the frame is of a noise class if the number of subbands having a peak-to-average ratio lower than a certain threshold is greater than a certain number, and determining that the high-frequency band signal of the frame is of a normal class if the number of subbands having a peak-to-average ratio lower than a certain threshold is equal to or less than the certain number.
[0005] The prior art has the following drawbacks:
[0006] In the prior art, during signal classification of a high frequency band signal of a frame, only the characteristics of the high frequency band signal of the frame are considered, which leads to an inaccurate signal classification result for the high frequency band signal of the frame. Summary of the Invention [Means for solving the problem]
[0007] SUMMARY OF THE DISCLOSURE The embodiments of the present invention provide a signal classification method and a signal classification device that provide more accurate signal classification results.
[0008] In view of the above, embodiments of the present invention provide the following.
[0009] The signal classification method is Dividing the current frame into a low frequency band signal and a high frequency band signal; According to a value requirement of a preset encoding / decoding characteristic parameter corresponding to a signal class, determining whether the encoding / decoding characteristic parameter of the current frame corresponding to the signal class satisfies the value requirement of the encoding / decoding characteristic parameter; and determining a signal class of the high frequency band signal of the current frame according to the determination result.
[0010] A signal classification device a splitting unit configured to split the current frame into a low frequency band signal and a high frequency band signal; A judging unit configured to determine according to a value requirement of a preset encoding / decoding characteristic parameter corresponding to a signal class, whether the encoding / decoding characteristic parameter of the current frame corresponding to the signal class satisfies the value requirement of the encoding / decoding characteristic parameter; and a judging unit configured to judge a signal class of the high frequency band signal of the current frame according to the judgment result.
[0011] The encoding method is Dividing the current frame into a low frequency band signal and a high frequency band signal; attenuating the high frequency band signal or the characteristic parameter to be encoded of the high frequency band signal according to an energy attenuation value of the low frequency band signal, where the energy attenuation value indicates an energy attenuation of the low frequency band signal caused by the encoding of the low frequency band signal; and encoding the attenuated high frequency band signal or the attenuated characteristic parameter to be encoded of the high frequency band signal.
[0012] The decoding method is Decoding the bitstream to obtain a high frequency band signal of the current frame or a characteristic parameter of the high frequency band signal of the current frame; and attenuating the high frequency band signal, or a characteristic parameter of the high frequency band signal, according to an energy attenuation value of the low frequency band signal of the current frame, where the energy attenuation value indicates the energy attenuation of the low frequency band signal caused by encoding the low frequency band signal.
[0013] The encoding device is a splitting unit configured to split the current frame into a low frequency band signal and a high frequency band signal; a correction unit configured to attenuate the high frequency band signal or the characteristic parameter to be encoded of the high frequency band signal according to an energy attenuation value of the low frequency band signal, where the energy attenuation value indicates the energy attenuation of the low frequency band signal caused by the encoding of the low frequency band signal of the current frame; and an encoding unit configured to encode the attenuated high frequency band signal or the attenuated characteristic parameter to be encoded of the high frequency band signal.
[0014] The decryption device A decoding unit configured to decode the bitstream to obtain a high frequency band signal of the current frame or a characteristic parameter of the high frequency band signal of the current frame; and a correction unit configured to attenuate the high frequency band signal, or a characteristic parameter of the high frequency band signal, in response to an energy attenuation value of the low frequency band signal of the current frame, where the energy attenuation value indicates the energy attenuation of the low frequency band signal caused by encoding the low frequency band signal of the current frame.
[0015] In one embodiment of the present invention, during signal classification, according to the value requirements of the preset encoding / decoding characteristic parameters corresponding to the signal classes, it is determined whether the encoding / decoding characteristic parameters of the current frame satisfy the value requirements of the encoding / decoding characteristic parameters, so as to determine whether the signal class of the high frequency band signal of the current frame is the signal class corresponding to the encoding / decoding characteristic parameters; further, in this way, the encoding / decoding characteristics of various signal classes are taken into account during signal classification, so that the signal classification for the high frequency band signal of the current frame is more accurate.
[0016] In another embodiment of the present invention, the high frequency band signal, or the characteristic parameters of the high frequency band signal to be encoded, are attenuated according to the energy attenuation value of the low frequency band signal of the current frame, and the attenuation result is encoded and further sent to the decoder, so that the energy of the high frequency band signal obtained by the decoder through decoding is attenuated accordingly, so that a better effect is realized after the high frequency band signal is combined with the low frequency band signal.
[0017] In order to more clearly illustrate the technical solutions according to the embodiments of the present invention, the accompanying drawings for describing the embodiments are briefly outlined below. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention, and those skilled in the art can derive other drawings from these accompanying drawings without creative efforts. [Brief description of the drawings]
[0018] [Figure 1]1 is a flow chart illustrating a signal classification method provided in an embodiment of the present invention. [Figure 2A] 4 is a flow chart illustrating a signal classification method provided in another embodiment of the present invention. [Figure 2B] 4 is a flow chart illustrating a signal classification method provided in another embodiment of the present invention. [Diagram 3] FIG. 2 is a structural diagram illustrating a signal classification device provided in an embodiment of the present invention. [Figure 4] 1 is a flow chart illustrating an encoding method provided in an embodiment of the present invention. [Diagram 5] 4 is a flow chart illustrating another encoding method provided in an embodiment of the present invention. [Figure 6] 4 is a flow chart illustrating a decoding method provided in an embodiment of the present invention. [Figure 7] 4 is a flow chart illustrating another decoding method provided in an embodiment of the present invention. [Figure 8] FIG. 2 is a structural diagram illustrating an encoding device provided in an embodiment of the present invention. [Figure 9] FIG. 2 is a structural diagram illustrating a decoding device provided in an embodiment of the present invention. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0019] The following embodiments of the present invention take into account the encoding / decoding characteristics of different signal classes during signal classification, and to make the technical solutions according to the embodiments of the present invention clearer, the characteristics of the encoding / decoding algorithms for different signal classes are briefly described below.
[0020] 1. When the class of the high frequency band signal of the current frame is a noise class, the encoding / decoding process of the high frequency band signal of the current frame includes the step that the encoder needs to obtain the ratio of the frequency domain envelope of the subband of the high frequency band signal to the frequency domain envelope of the corresponding subband of the low frequency band signal during encoding, and send these ratios to the decoder. In this way, the encoder and the decoder predetermine the mapping relationship between a certain subband of the high frequency band signal and a certain subband of the low frequency band signal. Alternatively, the encoder searches for the subband that is most strongly correlated with the frequency domain envelope of a certain subband of the high frequency band signal according to the frequency domain envelope of the subband of the low frequency band signal, and then sends the subband number (i.e., the serial number of the found subband of the low frequency band signal) and the ratio of the frequency domain envelope of the subband of the high frequency band signal to the frequency domain envelope of the found subband of the low frequency band signal to the decoder. During decoding, the decoder searches the subband of the low frequency band signal corresponding to the subband number, and further determines the frequency domain envelope of each subband of the high frequency band signal according to the ratio sent by the encoder, and the frequency domain envelope of the subband of the low frequency band signal specified according to the subband number. The decoder directly uses the excitation spectrum of the specified frequency range of the low frequency band as the excitation spectrum of the high frequency band, and in this way, the data frame of the noise class can be successfully decoded. From the above analysis, it can be seen that, when the class of the high frequency band signal of the current frame is the noise class, the encoding / decoding algorithm utilizes the interrelationship between the frequency domain envelope of the subband of the high frequency band signal and the frequency domain envelope of the corresponding subband of the low frequency band signal, during signal classification, the class of the high frequency band signal when the frequency domain envelope of the high frequency band signal is strongly interrelated with the frequency domain envelope of the low frequency band signal can be considered to be the noise class on the premise that the number of subbands having a peak-to-average ratio smaller than a certain threshold is greater than a certain number.
[0021] 2. If the class of the high frequency band signal of the current frame is the predicted class, the encoding / decoding process of the high frequency band signal of the data frame includes the following steps during encoding: the encoder first selects a subband that is most strongly correlated with the excitation spectrum of the subband of the high frequency band signal from the multiple excitation spectra of the multiple subbands of the low frequency band signal, and sends the sequence number of the selected subband to the decoder, and at the same time, sends the frequency domain envelope of the subband of the high frequency band signal to the decoder. The decoder determines the frequency domain envelope of the entire high frequency band signal according to the received frequency domain envelope of the subband of the high frequency band signal, and predicts the excitation spectrum of the subband of the high frequency band signal from the low frequency band signal according to the received subband sequence number, so as to determine the excitation spectrum of the entire high frequency band signal. From the above analysis, it can be seen that since the encoding / decoding algorithm utilizes the correlation between the excitation spectrum of the high frequency band signal and the excitation spectrum of the low frequency band signal when the class of the high frequency band signal of the current frame is a predicted class, during signal classification, it can be considered that the class of the high frequency band signal when the excitation spectrum of the high frequency band signal is strongly correlated with the excitation spectrum of the low frequency band signal can be determined to be the predicted class.
[0022] 3. If the class of the high frequency band signal of the current frame is a transition class, the processing manner on the excitation spectrum is similar to that of the noise class, and therefore the details are not described again here. The difference is that the encoder needs to send both the time domain envelope of the subframe of the high frequency band signal and the frequency domain envelope of the subframe to the decoder. The decoder recovers the high frequency band signal according to the above information sent by the encoder.
[0023] 4. If the class of the high frequency band signal of the current frame is a harmonic class, the manner of processing the excitation spectrum is basically similar to that of the noise class, and therefore the details are not described again here. The difference is that the encoder needs to send the frequency domain envelope of the sub-band of the high frequency band signal to the decoder. The decoder recovers the high frequency band signal according to the above information sent by the encoder.
[0024] 5. If the class of the high frequency band signal of the current frame is normal class, the processing aspect of the excitation spectrum is similar to that of the noise class, and therefore the details are not described again here. The difference is that the encoder needs to send the frequency domain envelope of the sub-band of the high frequency band signal to the decoder. The decoder recovers the high frequency band signal according to the above information sent by the encoder.
[0025] Referring to FIG. 1, an embodiment of the present invention provides a signal classification method, where the method specifically includes:
[0026] 101: Divide the current frame into a low frequency band signal and a high frequency band signal.
[0027] This embodiment of the present invention is implemented by an encoder.
[0028] In particular, the low frequency band signal and the high frequency band signal are relative concepts, and generally, the current frame is divided into the low frequency band signal and the high frequency band signal from the center frequency of the current frame by a quadrature mirror filter (QMF). However, the present invention is not limited to such division, and the current frame can also be divided into the low frequency band signal and the high frequency band signal from other frequencies in other processing manners.
[0029] 102: According to the value requirement of the preset encoding / decoding characteristic parameter corresponding to a signal class, determine whether the encoding / decoding characteristic parameter of the current frame corresponding to the signal class satisfies the value requirement of the encoding / decoding characteristic parameter. The signal class corresponding to the encoding / decoding characteristic parameter is a signal class having an encoding / decoding characteristic represented by the encoding / decoding characteristic parameter.
[0030] That is, according to the value requirements of the pre-set encoding / decoding characteristic parameters corresponding to a signal class, it is determined whether the value of the encoding / decoding characteristic parameters of the current frame corresponding to the signal class satisfies the value requirements of the encoding / decoding characteristic parameters.
[0031] The pre-set encoding / decoding characteristic parameters corresponding to the signal classes include at least one of an encoding / decoding characteristic parameter corresponding to a noise class, an encoding / decoding characteristic parameter corresponding to a predicted class, and an encoding / decoding characteristic parameter corresponding to a harmonic class.
[0032] The encoding / decoding characteristic parameter corresponding to the noise class is one of a correlation parameter between the amplitude of the low frequency band frequency domain signal and the amplitude of the high frequency band frequency domain signal, and a correlation parameter between the energy of the low frequency band frequency domain signal and the energy of the high frequency band frequency domain signal, however, the encoding / decoding characteristic parameter corresponding to the noise class is not limited to the correlation parameter between the amplitude (or energy) of the low frequency band frequency domain signal and the amplitude (or energy) of the high frequency band frequency domain signal, and may be a correlation parameter between other feature values of the low frequency band frequency domain signal and other feature values of the high frequency band frequency domain signal, which does not affect the implementation of the present invention.
[0033] When the encoding / decoding characteristic parameter corresponding to the noise class is a correlation parameter between the amplitude of the low frequency band frequency domain signal and the amplitude of the high frequency band frequency domain signal, this step is particularly a step of determining whether the correlation parameter between the amplitude of the low frequency band frequency domain signal and the amplitude of the high frequency band frequency domain signal of the current frame satisfies a value requirement of a preset correlation parameter between the amplitude of the low frequency band frequency domain signal and the amplitude of the high frequency band frequency domain signal; when the encoding / decoding characteristic parameter corresponding to the noise class is a correlation parameter between the energy of the low frequency band frequency domain signal and the energy of the high frequency band frequency domain signal, this step is particularly a step of determining whether the correlation parameter between the energy of the low frequency band frequency domain signal and the energy of the high frequency band frequency domain signal of the current frame satisfies a value requirement of a preset correlation parameter between the energy of the low frequency band frequency domain signal and the energy of the high frequency band frequency domain signal.
[0034] The value requirement of the preset encoding / decoding characteristic parameter corresponding to the noise class may be, in particular, greater than a certain threshold or within a certain value range. The value requirement of the correlation parameter between the amplitude of the low frequency band frequency domain signal and the amplitude of the high frequency band frequency domain signal and the value requirement of the correlation parameter between the energy of the low frequency band frequency domain signal and the energy of the high frequency band frequency domain signal may be the same or different.
[0035] The encoding / decoding characteristic parameter corresponding to the predicted class is one of the following: a correlation parameter between the frequency domain coefficient of the low frequency band signal and the frequency domain coefficient of the high frequency band signal, a correlation parameter between the absolute value of the frequency domain coefficient of the low frequency band signal and the absolute value of the frequency domain coefficient of the high frequency band signal, a correlation parameter between the frequency domain coefficient of the low frequency excitation spectrum and the frequency domain coefficient of the high frequency excitation spectrum, and a correlation parameter between the absolute value of the frequency domain coefficient of the low frequency band excitation spectrum and the absolute value of the frequency domain coefficient of the high frequency band excitation spectrum. The encoding / decoding characteristic parameter corresponding to the predicted class is not limited to the above correlation parameters, and can be a correlation parameter between other feature values of the low frequency band signal and other feature values of the high frequency band signal, or a correlation parameter between other feature values of the low frequency band excitation spectrum and other feature values of the high frequency band excitation spectrum, which does not affect the implementation of the present invention.
[0036] If the encoding / decoding characteristic parameter corresponding to the predicted class is a correlation parameter between the frequency domain coefficients of the low frequency band signal and the frequency domain coefficients of the high frequency band signal, this step is particularly a step of determining whether the correlation parameter between the frequency domain coefficients of the low frequency band signal and the frequency domain coefficients of the high frequency band signal of the current frame satisfies a value requirement of a preset correlation parameter between the frequency domain coefficients of the low frequency band signal and the frequency domain coefficients of the high frequency band signal. If the encoding / decoding characteristic parameter corresponding to the predicted class is a correlation parameter between the absolute value of the frequency domain coefficients of the low frequency band signal and the absolute value of the frequency domain coefficients of the high frequency band signal of the current frame, this step is particularly a step of determining whether the correlation parameter between the absolute value of the frequency domain coefficients of the low frequency band signal and the absolute value of the frequency domain coefficients of the high frequency band signal of the current frame satisfies a value requirement of a preset correlation parameter between the absolute value of the frequency domain coefficients of the low frequency band signal and the absolute value of the frequency domain coefficients of the high frequency band signal. If the encoding / decoding characteristic parameter corresponding to the predicted class is a correlation parameter between the frequency domain coefficients of the low frequency excitation spectrum and the frequency domain coefficients of the high frequency excitation spectrum, this step is particularly a step of determining whether the correlation parameter between the frequency domain coefficients of the low frequency excitation spectrum and the frequency domain coefficients of the high frequency excitation spectrum of the current frame satisfies the value requirement of a preset correlation parameter between the frequency domain coefficients of the low frequency excitation spectrum and the frequency domain coefficients of the high frequency excitation spectrum. If the encoding / decoding characteristic parameter corresponding to the predicted class is a correlation parameter between the absolute value of the frequency domain coefficients of the low frequency excitation spectrum and the absolute value of the frequency domain coefficients of the high frequency band excitation spectrum, this step is particularly a step of determining whether the correlation parameter between the absolute value of the frequency domain coefficients of the low frequency band excitation spectrum and the absolute value of the frequency domain coefficients of the high frequency band excitation spectrum satisfies the value requirement of a preset correlation parameter between the absolute value of the frequency domain coefficients of the low frequency band excitation spectrum and the absolute value of the frequency domain coefficients of the high frequency band excitation spectrum.
[0037] The value requirement of the preset encoding / decoding characteristic parameter corresponding to the predicted class may be, in particular, greater than a certain threshold value or within a certain value range.The value requirement of the correlation parameter between the frequency domain coefficient of the low frequency band signal and the frequency domain coefficient of the high frequency band signal, the value requirement of the correlation parameter between the absolute value of the frequency domain coefficient of the low frequency band signal and the absolute value of the frequency domain coefficient of the high frequency band signal, the value requirement of the correlation parameter between the frequency domain coefficient of the low frequency band excitation spectrum and the frequency domain coefficient of the high frequency band excitation spectrum, and the value requirement of the correlation parameter between the absolute value of the frequency domain coefficient of the low frequency band excitation spectrum and the absolute value of the frequency domain coefficient of the high frequency band excitation spectrum may be the same or different, which does not affect the implementation of the present invention.
[0038] The encoding / decoding characteristic parameter corresponding to the harmonic class is one of the correlation parameters between the frequency domain coefficients of the low frequency band signal and the frequency domain coefficients of the high frequency band signal, the correlation parameters between the absolute values of the frequency domain coefficients of the low frequency band signal and the absolute values of the frequency domain coefficients of the high frequency band signal, the correlation parameters between the frequency domain coefficients of the low frequency band excitation spectrum and the frequency domain coefficients of the high frequency band excitation spectrum, and the correlation parameters between the absolute values of the frequency domain coefficients of the low frequency band excitation spectrum and the absolute values of the frequency domain coefficients of the high frequency band excitation spectrum, and the relevant description is the same as the description of the value requirements of the encoding / decoding characteristic parameters corresponding to the predicted class, and therefore the details will not be described again here.
[0039] It should be noted that the signal classes in the preset encoding / decoding characteristic parameters corresponding to the signal classes are not limited to the classes mentioned above, and encoding / decoding characteristic parameters corresponding to other signal classes may also be preset, and this does not affect the implementation of the present invention.
[0040] 103: According to the determination result, determine the signal class of the high frequency band signal of the current frame.
[0041] In one implementation, if the value of the encoding / decoding characteristic parameter of the current frame corresponding to the noise class meets the value requirement of the preset encoding / decoding characteristic parameter corresponding to the noise class, the signal class of the high-frequency band signal of the current frame is determined to be the noise class. In one exemplary implementation, if the number of subbands having a peak-to-average ratio smaller than the second threshold is greater than a second predetermined number and the value of the encoding / decoding characteristic parameter of the current frame corresponding to the noise class meets the value requirement of the preset encoding / decoding characteristic parameter corresponding to the noise class, the signal class of the high-frequency band signal of the current frame is determined to be the noise class.
[0042] In one implementation, when the preset encoding / decoding characteristic parameters corresponding to the signal class include encoding / decoding characteristic parameters corresponding to a predicted class or encoding / decoding characteristic parameters corresponding to a harmonic class, if the encoding / decoding characteristic parameters of the current frame corresponding to the predicted class meet the value requirements of the preset encoding / decoding characteristic parameters corresponding to the predicted class, the signal class of the high frequency band signal of the current frame is determined to be the predicted class. Alternatively, if the encoding / decoding characteristic parameters of the current frame corresponding to the harmonic class meet the value requirements of the preset encoding / decoding characteristic parameters corresponding to the harmonic class, the signal class of the high frequency band signal of the current frame is determined to be the high frequency class. In an exemplary implementation, if the number of subbands having a peak-to-average ratio greater than the first threshold is greater than a first predetermined number and the encoding / decoding characteristic parameter of the current frame corresponding to the harmonic class meets the value requirement of the preset encoding / decoding characteristic parameter of the harmonic class, the signal class of the high frequency band signal of the current frame is determined to be a harmonic class; or if the number of subbands having a peak-to-average ratio greater than the first threshold is less than or equal to a first predetermined number and the encoding / decoding characteristic parameter of the current frame corresponding to the predicted class meets the value requirement of the preset encoding / decoding characteristic parameter of the predicted class. If the value requirements of the decoding characteristic parameters are satisfied, the signal class of the high frequency band signal of the current frame is determined to be the predicted class; or alternatively, if the number of subbands having peak-to-average ratios greater than the first threshold is less than or equal to a first predetermined number, the number of subbands having peak-to-average ratios less than the second threshold is less than or equal to a second predetermined number, and the encoding / decoding characteristic parameters of the current frame corresponding to the predicted class satisfy the value requirements of the pre-set encoding / decoding characteristic parameters corresponding to the predicted class, the signal class of the high frequency band signal of the current frame is determined to be the predicted class.
[0043] In one implementation, when the preset encoding / decoding characteristic parameters corresponding to the signal class include an encoding / decoding characteristic parameter corresponding to the predicted class and an encoding / decoding characteristic parameter corresponding to the harmonic class, if the number of subbands having a peak-to-average ratio greater than the first threshold is greater than a first predetermined number, and the encoding / decoding characteristic parameter of the current frame corresponding to the harmonic class meets the value requirement of the preset encoding / decoding characteristic parameter corresponding to the harmonic class, the signal class of the high frequency band signal of the current frame is determined to be a harmonic class; if the number of subbands having a peak-to-average ratio greater than the first threshold is equal to or less than a first predetermined number, the number of subbands having a peak-to-average ratio less than a second threshold is equal to or less than a second predetermined number, and the encoding / decoding characteristic parameter of the current frame corresponding to the predicted class meets the value requirement of the preset encoding / decoding characteristic parameter corresponding to the predicted class, the signal class of the high frequency band signal of the current frame is determined to be a predicted class. The first threshold and the second threshold may be the same or different.
[0044] In yet another implementation, the full-frequency time-domain signal of the current frame is divided into N subframes, and if the energy of one subframe is greater than a certain multiple of the energy of the subframe before that subframe, the signal class of the high-frequency band signal of the current frame is determined to be a transition class.
[0045] In this embodiment of the present invention, during signal classification, according to the value requirement of the preset encoding / decoding characteristic parameter corresponding to the signal class, it is determined whether the value of the encoding / decoding characteristic parameter of the current frame meets the value requirement of the encoding / decoding characteristic parameter, so as to determine whether the signal class of the high frequency band signal of the current frame is the signal class corresponding to the encoding / decoding characteristic parameter, in this way, the encoding / decoding characteristics of various signal classes are taken into account during signal classification, so as to make the signal classification more accurate.
[0046] In order to make the technical solution provided in the embodiments of the present invention clearer, the technical solution is described in detail below through the following embodiments.
[0047] 201: The encoder divides the full-frequency time-domain signal of the current frame into N subframes.
[0048] 202: The encoder calculates the energy or amplitude of each subframe.
[0049] 203: The encoder determines whether the specified subframe exists in the current frame, and if so, executes step 204, otherwise executes step 205. The energy of the specified subframe is greater than a certain multiple of the energy of the subframe preceding the specified subframe, or the amplitude of the specified subframe is greater than a certain multiple of the amplitude of the subframe preceding the specified subframe.
[0050] For example, if the energy of a particular subframe in the current frame in the encoder is E CUR and the energy of the subframe before that subframe is E prev where the predetermined multiple is pre-set in the encoding section and is assumed to be a, and generally a>5, and E CUR >a×E prev If so, then the subframe is the designated subframe.
[0051] 204: The encoder determines that the signal class of the high frequency band signal of the current frame is the transition class, and the process ends.
[0052] One subframe includes a high frequency band portion and a low frequency band portion, and generally, the energy of the low frequency band portion is greater than the energy of the high frequency band portion. Therefore, for two consecutive subframes, i.e., subframe 1 and subframe 2, it is assumed that the energy of the high frequency band portion of subframe 1 is 1, the energy of the high frequency band portion of subframe 2 is 6, the energy of the low frequency band portion of subframe 1 is 100, the energy of the low frequency band portion of subframe 2 is 100, the energy of subframe 1 is 101, and further the energy of subframe 2 is 106. Assuming that the predetermined multiple is 5, by adopting the solution of step 203, the energy of subframe 2 is less than or equal to the predetermined multiple of the energy of subframe 1, and therefore subframe 2 is not the designated subframe. The solution in the prior art is to determine whether a designated subframe exists in the high frequency band signal of the current frame, and according to the solution in the prior art, the high frequency band energy of subframe 2 is greater than a predetermined multiple of the high frequency band energy of subframe 1, and therefore subframe 2 is the designated subframe. In this way, in view of the entire frequency band of the data frame, only if there is a significant energy jump between the high frequency band parts of adjacent subframes, the data frame is determined to be a transition class, and it can be seen that the technical solution of determining whether a data frame is a transition class according to the embodiment of the present invention brings about a more accurate signal classification result.
[0053] 205: The encoder divides the high frequency band frequency domain signal of the current frame into M subbands.
[0054] Prior to step 205, the encoder needs to split the current frame into a low frequency band signal and a high frequency band signal.
[0055] 206: The encoder determines whether the number of subbands in the high frequency band frequency domain signal of the current frame having a peak-to-average ratio exceeding a first threshold is greater than a first predetermined number, and if it is greater than the first predetermined number, executes step 207, and if it is less than or equal to the first predetermined number, executes step 208.
[0056] 207: The encoder determines that the signal class of the high frequency band signal of the current frame is the harmonic class, and the process ends.
[0057] 208: The encoder determines whether the number of subbands in the high frequency band frequency domain signal of the current frame having a peak-to-average ratio smaller than the second threshold is greater than a second predetermined number, and if it is greater than the second predetermined number, executes step 209, and if it is less than or equal to the second predetermined number, executes step 211.
[0058] The first predetermined number and the second predetermined number are empirical values obtained through experience, and may be the same or different.
[0059] 209: The encoder obtains a correlation parameter between the energy or amplitude of the high frequency band frequency domain signal and the energy or amplitude of the low frequency band frequency domain signal of the current frame, determines whether the value of the correlation parameter between the energy or amplitude of the high frequency band frequency domain signal and the energy or amplitude of the low frequency band frequency domain signal of the current frame is greater than a predetermined energy threshold or amplitude threshold, and if it is greater than the predetermined energy threshold or amplitude threshold, executes step 210, and if it is equal to or less than the predetermined energy threshold or amplitude threshold, executes step 211.
[0060] This particular process of obtaining the value of the correlation parameter between the energy or amplitude of the high frequency band frequency domain signal and the energy or amplitude of the low frequency band frequency domain signal of the current frame includes, but is not limited to, the following two aspects.
[0061] First mode: the encoder obtains values of correlation parameters between the energy or amplitude of a subband of a high frequency band signal and the energy or amplitude of a subband of a low frequency band signal, each corresponding to one of these subbands, calculates an average value of the obtained values of these correlation parameters, and uses the average value as a value of the correlation parameter between the energy or amplitude of the high frequency band frequency domain signal and the energy or amplitude of the low frequency band frequency domain signal of the current frame.
[0062] In this way, the encoder and decoder have already determined in advance the mapping relationship between a specific subband of the high frequency band signal and a specific subband of the low frequency band signal, and correspondingly, the encoder determines the value of the correlation parameter between the energy or amplitude of a specific subband of the high frequency band signal and the energy or amplitude of the subband of the low frequency band signal corresponding to the specific subband according to the mapping relationship, and similarly calculates the values of the correlation parameter between the energy or amplitude of multiple subbands of the high frequency band and the energy or amplitude of multiple corresponding subbands of the low frequency band, and then obtains the average value of the calculated values of these correlation parameters to obtain the value of the correlation parameter between the energy or amplitude of the high frequency band frequency domain signal and the energy or amplitude of the low frequency band frequency domain signal.
[0063] In this way, the encoder is able to obtain values of a correlation parameter between the energy or amplitude of a subband of the high frequency band signal and the energy or amplitude of the subband of the low frequency band signal corresponding to those subbands, in particular in dependence on the ratio of the energy or amplitude of the subband of the high frequency band signal to the energy or amplitude of the subband of the low frequency band signal each corresponding to the subband; generally, if the ratio is close to 1, this indicates a strong correlation between the two and the value of the correlation parameter is large, and if the ratio is not close to 1, this indicates a weak correlation between the two and the value of the correlation parameter is small; or the encoder is able to calculate values of the correlation parameter in dependence on the absolute value of the difference between the energy or amplitude of the subband of the high frequency band signal and the energy or amplitude of the subband of the low frequency band signal each corresponding to the subband; generally, if this absolute value is small, this indicates a strong correlation between the two and the value of the correlation parameter is large, and if this absolute value is not small, this indicates a weak correlation between the two and the value of the correlation parameter is small.
[0064] Second mode: the encoder determines each subband of the low frequency band signal that is most strongly correlated with the energy or amplitude of each subband of the high frequency band signal, obtains a value of a correlation parameter between the energy or amplitude of each subband of the high frequency band signal and the determined most strongly correlated subband of the low frequency band signal, calculates an average value of the obtained values of these correlation parameters, and uses the average value as a value of the correlation parameter between the energy or amplitude of the high frequency band frequency domain signal and the energy or amplitude of the low frequency band frequency domain signal of the current frame.
[0065] This aspect is explained below by using an example.
[0066] It is assumed that the high frequency band signal includes 10 subbands, the low frequency band signal includes 10 subbands, and from among the subbands of the low frequency band signal, a subband that is most strongly correlated with the energy or amplitude of a first subband of the high frequency band is searched for, and a value of a correlation parameter between the two subbands is obtained; similarly, from among the subbands of the low frequency band signal, a subband that is most strongly correlated with the energy or amplitude of a second subband of the high frequency band is searched for, and a value of a correlation parameter between the two subbands is obtained; in this way, 10 correlation parameter values are similarly obtained, and an average value of the 10 correlation parameters is calculated and used as the value of the correlation parameter between the energy or amplitude of the high frequency band frequency domain signal and the energy or amplitude of the low frequency band frequency domain signal.
[0067] Thus, the particular manner of obtaining the value of the correlation parameter between the energy or amplitude of a subband of the high frequency band signal and the energy or amplitude of the most strongly correlated subband of the low frequency band signal is similar to the first manner and therefore will not be described in detail again here.
[0068] The number of subbands can be 1 or more, and if the number of subbands is 1, the value of the correlation parameter is calculated directly for the entire frequency band.
[0069] 210: The encoder determines that the signal class of the high frequency band signal of the current frame is the noise class, and the process ends.
[0070] 211: The encoder obtains a value of a correlation parameter between the frequency domain coefficients of the high frequency band excitation spectrum and the frequency domain coefficients of the low frequency band excitation spectrum of the current frame, and determines whether the value of the correlation parameter between the frequency domain coefficients of the high frequency band excitation spectrum and the frequency domain coefficients of the low frequency band excitation spectrum is greater than a certain predetermined threshold, and if it is greater than the predetermined threshold, executes step 212, and if it is equal to or less than the predetermined threshold, executes step 213.
[0071] A value of a cross-relation parameter between the frequency domain coefficients of the high frequency band excitation spectrum and the frequency domain coefficients of the low frequency band excitation spectrum of the current frame may be obtained by using a normalized cross-correlation algorithm.
[0072] In one implementation, the value of the interrelationship parameter between the frequency domain coefficients of the high frequency band excitation spectrum and the frequency domain coefficients of the low frequency band excitation spectrum of the current frame may be obtained in the following manner: the encoder determines the subbands of the low frequency band signal that are most strongly interrelated with the frequency domain coefficients of the excitation spectrum of each subband of the high frequency band signal of the current frame, respectively, obtains the value of the interrelationship parameter between the frequency domain coefficients of the excitation spectrum of each subband of the high frequency band signal and the frequency domain coefficients of the excitation spectrum of the determined most strongly interrelated subband of the low frequency band signal, and further calculates the average value of the obtained values of the interrelationship parameter to obtain the value of the interrelationship parameter between the frequency domain coefficients of the high frequency band excitation spectrum and the frequency domain coefficients of the low frequency band excitation spectrum of the current frame.
[0073] It is assumed that the high frequency band excitation spectrum includes two subbands, the low frequency band excitation spectrum includes five subbands, each subband of the high frequency band includes 20 frequency domain coefficients, and each subband of the low frequency band includes 40 frequency domain coefficients. By using the following formula, normalized correlation parameter values of the 40 frequency domain coefficients of each subband of the low frequency band signal and the 1st through 20th frequency domain coefficients, the 2nd through 21st frequency domain coefficients, the 3rd through 22nd frequency domain coefficients, ..., and the 21st through 40th frequency domain coefficients of the 20 frequency domain coefficients of the first subband of the high frequency band are determined, and the maximum of the determined normalized correlation parameter values is obtained; similarly, the 40 frequency domain coefficients of each subband of the low frequency band signal, and the high frequency band Normalized correlation parameter values for the first through twentieth frequency domain coefficients, the second through twenty-first frequency domain coefficients, the third through twenty-second frequency domain coefficients, ..., and the twenty-first through fortieth frequency domain coefficients of the second subband of the current frame are determined, a maximum value among the determined normalized correlation parameter values is obtained, and an average value of the two maximum values is calculated to obtain a value of a correlation parameter between the frequency domain coefficients of the high frequency band excitation spectrum and the frequency domain coefficients of the low frequency band excitation spectrum of the current frame.
[0074]
number
[0075] In this case, a i and b i are specific frequency domain coefficients in a subband of the low frequency band signal and specific frequency domain coefficients in a subband of the high frequency band signal, respectively. For example, when normalized correlation parameter values of the second to twenty-first frequency domain coefficients of a specific subband of the low frequency band signal and the twenty frequency domain coefficients of the high frequency band signal are calculated, a1 is the second frequency domain coefficient of the specific subband of the low frequency band signal, a2 is the third frequency domain coefficient of the subband, and a 20is the 21st frequency domain coefficient of that subband, and b1 through b 20 are the 20 frequency domain coefficients in a particular subband of the high frequency band signal.
[0076] Alternatively, in another implementation, the encoder may also obtain the value of a correlation parameter between the absolute values of the frequency domain coefficients of the high frequency band excitation spectrum and the absolute values of the frequency domain coefficients of the low frequency band excitation spectrum of the current frame in this step, and determine whether the value of the correlation parameter between the absolute values of the frequency domain coefficients of the high frequency band excitation spectrum and the absolute values of the frequency domain coefficients of the low frequency band excitation spectrum is greater than a certain threshold, and if it is greater than the threshold, perform step 212, and if it is equal to or less than the threshold, perform step 213.
[0077] 212: The encoder determines that the signal class of the high frequency band signal of the current frame is the predicted class, and the process ends.
[0078] 213: The encoder determines that the signal class of the high frequency band signal of the current frame is a normal class.
[0079] It should be noted that the order of the above-mentioned judgment steps is not fixed and can be changed. For example, steps 206 to 211 may be executed first. Step 211 is executed, and if the judgment result is “Yes”, step 212 is executed. If the judgment result is “No”, steps 201 to 204 are executed. However, if the judgment result of step 203 is “Yes”, the signal class of the high frequency band signal of the current frame is determined to be a transition class, and if the judgment result of step 203 is “No”, the signal class of the high frequency band signal of the current frame is determined to be a normal class.
[0080] In the embodiment of the present invention, during signal classification, the encoding / decoding characteristics of the high frequency band signal of the current frame are taken into consideration, so that if the energy or amplitude of the high frequency band frequency domain signal and the energy or amplitude of the low frequency band frequency domain signal are strongly correlated with each other, the high frequency band signal is classified into a noise class, and if the frequency domain coefficients of the high frequency band excitation spectrum and the frequency domain coefficients of the low frequency band excitation spectrum of the current frame are strongly correlated with each other, the high frequency band signal is classified into a predicted class, so that the signal classification is more accurate; whereas in the prior art, the class is determined according to only the peak-to-average ratio, and the encoding / decoding characteristics of the signal are not taken into consideration, so that a data frame having the encoding / decoding characteristics of the noise class may be classified into a normal class, resulting in an inaccurate classification result; and further, when determining whether the high frequency band signal of the current frame is a transition class, the determination is performed based on the subframes of the full frequency band of the current frame, but not only on the subbands in the high frequency band signal, so that the determination is more accurate. Furthermore, since the signal classification is more accurate, when the same number of bits are used, the encoding / decoding performance is improved; for example, when the signal classification method in the prior art determines that the signal class of a high-frequency band signal of a particular frame is a normal class, while the signal classification method provided in the present application determines that the signal class of the high-frequency band signal of the frame is a noise class, and further, when the encoder and decoder determine in advance the mapping relationship between a particular sub-band of the high-frequency band signal and a particular sub-band of the low-frequency band signal, the encoder only needs to send the ratio of the energy or amplitude of the sub-band of the high-frequency band signal to the energy or amplitude of the sub-band of the low-frequency band signal, and does not need to transmit other information, thereby reducing the number of bits.
[0081] Alternatively, in another implementation, in step 211, the encoder can obtain a value of a correlation parameter between the frequency domain coefficients of the high frequency band signal and the frequency domain coefficients of the low frequency band signal of the current frame, determine whether the value of the correlation parameter between the frequency domain coefficients of the high frequency band signal and the frequency domain coefficients of the low frequency band signal is greater than a certain threshold, and if it is greater than the threshold, execute step 212, and if it is equal to or less than the threshold, execute step 213. In detail, the value of the correlation parameter between the frequency domain coefficients of the high frequency band signal and the frequency domain coefficients of the low frequency band signal of the current frame can be obtained in the following manner. That is, the encoder determines each subband of the low frequency band signal that is most strongly correlated with the frequency domain coefficients of each subband of the high frequency band signal of the current frame, obtains values of correlation parameters between the frequency domain coefficients of each subband of the high frequency band signal and the frequency domain coefficients of the determined subband of the low frequency band signal that is most strongly correlated with the subband, calculates an average value of the obtained values of the correlation parameters, and uses the average value as the value of the correlation parameter between the frequency domain coefficients of the high frequency band signal and the frequency domain coefficients of the low frequency band signal of the current frame.
[0082] Alternatively, in another implementation, in step 211, the encoder can obtain a value of a correlation parameter between the absolute values of the frequency domain coefficients of the high frequency band signal and the absolute values of the frequency domain coefficients of the low frequency band signal of the current frame, determine whether the value of the correlation parameter between the absolute values of the frequency domain coefficients of the high frequency band signal and the absolute values of the frequency domain coefficients of the low frequency band signal is greater than a certain threshold, and if it is greater than the threshold, perform step 212, and if it is equal to or less than the threshold, perform step 213.
[0083] Alternatively, in another implementation, if the number of subbands having a peak-to-average ratio smaller than the second threshold is greater than a second predetermined number and the value of the encoding / decoding characteristic parameter of the current frame corresponding to the noise class satisfies the value requirement of the pre-set encoding / decoding characteristic parameter corresponding to the noise class (i.e., the correlation parameter between the amplitude of the low frequency band frequency domain signal and the amplitude of the high frequency band frequency domain signal of the current frame satisfies the pre-set value requirement, or the correlation parameter between the energy of the low frequency band frequency domain signal and the energy of the high frequency band frequency domain signal satisfies the pre-set value requirement), the signal class of the high frequency band signal of the current frame is determined to be the noise class.
[0084] If the number of subbands having a peak-to-average ratio greater than the first threshold is greater than a first predetermined number and the value of the encoding / decoding characteristic parameter of the current frame corresponding to the harmonic class satisfies the value requirement of the preset encoding / decoding characteristic parameter corresponding to the harmonic class (i.e., the correlation parameter between the frequency domain coefficients of the low frequency band signal and the frequency domain coefficients of the high frequency band signal, or the correlation parameter between the absolute values of the frequency domain coefficients of the low frequency band signal and the absolute values of the frequency domain coefficients of the high frequency band signal, or the correlation parameter between the frequency domain coefficients of the low frequency band excitation spectrum and the frequency domain coefficients of the high frequency band excitation spectrum, or the correlation parameter between the absolute values of the frequency domain coefficients of the low frequency band excitation spectrum and the frequency domain coefficients of the high frequency band excitation spectrum satisfies the preset value requirement), the signal class of the high frequency band signal of the current frame is determined to be a harmonic class.
[0085] If the number of subbands having a peak-to-average ratio greater than the first threshold is equal to or less than a first predetermined number, the number of subbands having a peak-to-average ratio less than the second threshold is equal to or less than a second predetermined number, and the value of the encoding / decoding characteristic parameter of the current frame corresponding to the predicted class satisfies the value requirement of the preset encoding / decoding characteristic parameter corresponding to the predicted class (i.e., the correlation parameter between the frequency domain coefficients of the low frequency band signal and the frequency domain coefficients of the high frequency band signal, or the correlation parameter between the absolute values of the frequency domain coefficients of the low frequency band signal and the absolute values of the frequency domain coefficients of the high frequency band signal, or the correlation parameter between the frequency domain coefficients of the low frequency band excitation spectrum and the frequency domain coefficients of the high frequency band excitation spectrum, or the correlation parameter between the absolute values of the frequency domain coefficients of the low frequency band excitation spectrum and the frequency domain coefficients of the high frequency band excitation spectrum satisfies the preset value requirement), the signal class of the high frequency band signal of the current frame is determined to be the predicted class.
[0086] By using the above technical solution, if a data frame has already been determined not to belong to the transition class, the noise class, the harmonic class, and the predicted class, the data frame can be determined to belong to the normal class.
[0087] The value requirements of the encoding / decoding characteristic parameters corresponding to the harmonic class and the value requirements of the encoding / decoding characteristic parameters corresponding to the predicted class may be the same or different, which does not affect the implementation of the present invention.
[0088] Referring to FIG. 3, one embodiment of the present invention provides a signal classification device, which in particular comprises: a splitting unit 10 configured to split a current frame into a low frequency band signal and a high frequency band signal; a judging unit 20 configured to determine whether an encoding / decoding characteristic parameter of a current frame corresponding to a signal class satisfies the value requirement of the encoding / decoding characteristic parameter according to a value requirement of a preset encoding / decoding characteristic parameter corresponding to the signal class, the judging unit 20 judging whether a value of an encoding / decoding characteristic parameter of a current frame corresponding to the signal class satisfies the value requirement of the encoding / decoding characteristic parameter according to the value requirement of the preset encoding / decoding characteristic parameter corresponding to the signal class; and a determining unit 30 configured to determine, according to a determining result of whether the signal class of the high frequency band signal of the current frame is a signal class corresponding to the encoding / decoding characteristic parameter, whether the signal class corresponding to the encoding / decoding characteristic parameter is a signal class having encoding / decoding characteristics represented by the encoding / decoding characteristic parameter.
[0089] In one implementation, the preset encoding / decoding characteristic parameters corresponding to the signal class include encoding / decoding characteristic parameters corresponding to a noise class, where the encoding / decoding characteristic parameters corresponding to the noise class are any of a correlation parameter between the amplitude of the low frequency band frequency domain signal and the amplitude of the high frequency band frequency domain signal, and a correlation parameter between the energy of the low frequency band frequency domain signal and the energy of the high frequency band frequency domain signal. In this case, the signal classification device may further include a second peak-to-average ratio judgment unit 40 configured to judge whether the number of subbands having a peak-to-average ratio smaller than a second threshold in the high frequency band signal of the current frame is greater than a second predetermined number, and the judgment unit includes a noise class judgment unit 31 configured to judge that the signal class of the high frequency band signal of the current frame is a noise class if the number of subbands having a peak-to-average ratio smaller than the second threshold is greater than the second predetermined number and the value of the encoding / decoding characteristic parameters of the current frame corresponding to the noise class meets the value requirement of the preset encoding / decoding characteristic parameters corresponding to the noise class. Alternatively, the signal classification device may not include the second peak-to-average ratio judgment unit 40, and another device or chip is used to determine whether the number of sub-bands in the high frequency band signal of the current frame having a peak-to-average ratio smaller than the second threshold is greater than a second predetermined number, and notify the signal classification device of the judgment result.
[0090] In another implementation form, the pre-set encoding / decoding characteristic parameters corresponding to the signal class include encoding / decoding characteristic parameters corresponding to the predicted class or encoding / decoding characteristic parameters corresponding to the harmonic class, where the corresponding descriptions of the encoding / decoding characteristic parameters corresponding to the predicted class and the encoding / decoding characteristic parameters corresponding to the harmonic class are identical to those in the method embodiment, and therefore the details will not be described again here. The signal classification device may further include a first peak-to-average ratio judgment unit 50 configured to determine whether the number of subbands having a peak-to-average ratio greater than the first threshold in the high frequency band signal of the current frame is greater than a first predetermined number, and if the preset encoding / decoding characteristic parameters corresponding to the signal class include an encoding / decoding characteristic parameter corresponding to a harmonic class, the judgment unit includes a harmonic class judgment unit 32 configured to determine that the signal class of the high frequency band signal of the current frame is a harmonic class if the number of subbands having a peak-to-average ratio greater than the first threshold is greater than the first predetermined number and the value of the encoding / decoding characteristic parameter of the current frame corresponding to the harmonic class satisfies the value requirement of the preset encoding / decoding characteristic parameter corresponding to the harmonic class. When the preset encoding / decoding characteristic parameters corresponding to the signal class include encoding / decoding characteristic parameters corresponding to the predicted class, the determination unit includes a predicted class determination unit 33 configured to determine that the signal class of the high frequency band signal of the current frame is the predicted class if the number of subbands having a peak-to-average ratio greater than a first threshold is less than or equal to a first predetermined number and the value of the encoding / decoding characteristic parameters of the current frame corresponding to the predicted class satisfies the value requirement of the preset encoding / decoding characteristic parameters corresponding to the predicted class.Alternatively, the signal classification device may not include the first peak-to-average ratio judgment unit 50, and other devices or chips are used to judge whether the number of subbands having a peak-to-average ratio larger than the first threshold in the high frequency band signal of the current frame is larger than a first predetermined number, and further inform the signal classification device of the judgment result. In one exemplary implementation, the predicted class judgment unit is specifically configured to judge that the signal class of the high frequency band signal of the current frame is a predicted class if the number of subbands having a peak-to-average ratio smaller than the second threshold is equal to or smaller than a second predetermined number, the number of subbands having a peak-to-average ratio larger than the first threshold is equal to or smaller than a first predetermined number, and the value of the encoding / decoding characteristic parameter of the current frame corresponding to the predicted class satisfies the value requirement of the preset encoding / decoding characteristic parameter corresponding to the predicted class. In this case, the signal classification device may further include a second peak-to-average ratio judgment unit 40 configured to determine whether the number of subbands in the high frequency band signal of the current frame having a peak-to-average ratio smaller than a second threshold is greater than a second predetermined number.
[0091] In one implementation form, the pre-set encoding / decoding characteristic parameters corresponding to the signal class include encoding / decoding characteristic parameters corresponding to the predicted class and encoding / decoding characteristic parameters corresponding to the harmonic class, where the corresponding descriptions of the encoding / decoding characteristic parameters corresponding to the predicted class and the encoding / decoding characteristic parameters corresponding to the harmonic class are the same as those in the method embodiment, and therefore the details will not be described again here. In this case, the signal classification device may further include a second peak-to-average ratio judging unit 40 configured to judge whether a number of subbands having a peak-to-average ratio smaller than a second threshold in the high frequency band signal of the current frame is greater than a second predetermined number, and a first peak-to-average ratio judging unit 50 configured to judge whether a number of subbands having a peak-to-average ratio larger than a first threshold in the high frequency band signal of the current frame is greater than a first predetermined number, and the judging unit judges whether a number of subbands having a peak-to-average ratio larger than the first threshold is greater than the first predetermined number and a value of the encoding / decoding characteristic parameter of the current frame corresponding to the harmonic class is greater than a preset number corresponding to the harmonic class. the number of subbands having a peak-to-average ratio greater than the first threshold is equal to or less than a first predetermined number, the number of subbands having a peak-to-average ratio less than the second threshold is equal to or less than a second predetermined number, and the value of the encoding / decoding characteristic parameter of the current frame corresponding to the predicted class satisfies the value requirement of the preset encoding / decoding characteristic parameter corresponding to the predicted class; and a predicted class determination unit 33 configured to determine that the signal class of the high frequency band signal of the current frame is the predicted class if the number of subbands having a peak-to-average ratio greater than the first threshold is equal to or less than a first predetermined number, the number of subbands having a peak-to-average ratio less than the second threshold is equal to or less than a second predetermined number, and the value of the encoding / decoding characteristic parameter of the current frame corresponding to the predicted class satisfies the value requirement of the preset encoding / decoding characteristic parameter corresponding to the predicted class.Alternatively, the signal classification device may not include the second peak-to-average ratio judgment unit 40 and the first peak-to-average ratio judgment unit 50, and other devices or chips are used to perform the judgment and then inform the signal classification device of the judgment result.
[0092] It should be noted that although a predicted class determination unit 33, a harmonic class determination unit 32, and a noise class determination unit 31 are depicted in FIG. 7, the determination unit 30 may include only any one or two of these units in a particular implementation.
[0093] In yet another implementation, the device comprises: The signal processing device further includes a transition class determining unit configured to divide the full-frequency time domain signal of the current frame into N subframes, and determine that the signal class of the high-frequency band signal of the current frame is a transition class when the energy of one subframe is greater than a certain multiple of the energy of the subframe before the subframe.
[0094] In this embodiment of the present invention, during signal classification, whether the signal class of the current frame is the signal class corresponding to the encoding / decoding characteristic parameter is determined by determining whether the value of the encoding / decoding characteristic parameter of the current frame meets the preset requirement, and in this way, the encoding / decoding characteristics of various signal classes are taken into account during signal classification, so that the signal classification is more accurate. Furthermore, since the signal classification for the data frame is more accurate, the number of bits transmitted after the data frame is encoded is reduced. If the signal classification method in the prior art determines that a certain data frame is a normal frame, while the signal classification method in the present application determines that the data frame is a noise frame, and the encoder and decoder determine in advance the mapping relationship between a certain subband of the high frequency band signal and a certain subband of the low frequency band signal, the encoder only needs to send the ratio of the frequency domain envelope of that subband of the high frequency band signal to the frequency domain envelope of that subband of the low frequency band signal, and does not need to send information related to the excitation spectrum, so that the number of bits is reduced.
[0095] The signal classification device may be located on the system side, for example in a base station, and may in particular be a chip or a software module in the base station. Alternatively, the signal classification device may be located on the terminal device side, and may in particular be a chip or a software module.
[0096] In band-based coding / decoding algorithms, generally, different algorithms are used for coding / decoding low-frequency band signals and for coding / decoding high-frequency band signals, and generally, the algorithm used for coding / decoding low-frequency band signals is CELP (Code Excited Linear Prediction, code excited linear prediction), which may be ACELP (Algebraic Code Excited Linear Prediction, algebraic code excited linear prediction), QCELP (Qualcomm Code Excited Linear Prediction), or RCELP (Relaxed code excited linear prediction). Due to the CELP algorithm, the encoder attenuates the energy of the low-frequency band signal when encoding the low-frequency band signal. Existing algorithms for encoding / decoding high frequency band signals do not attenuate the energy of high frequency band signals, but if the energy of high frequency band signals is not attenuated, sometimes the signal obtained by the decoder through decoding is unpleasant to hear; therefore, to solve the aforementioned technical problem, the following embodiments of the present invention provide an encoding method and a decoding method, and an encoding device and a decoding device, which correspondingly attenuate the energy of high frequency band signals.
[0097] Referring to FIG. 4, an embodiment of the present invention provides an encoding method, which mainly includes:
[0098] 401: Divide the current frame into a low frequency band signal and a high frequency band signal.
[0099] This embodiment of the present invention is implemented by an encoder.
[0100] In particular, the low frequency band signal and the high frequency band signal are relative concepts, and generally, the input signal is divided into the low frequency band signal and the high frequency band signal from the center frequency of the input signal by the QMF filter. However, the present invention is not limited to such division, and the input signal can also be divided into the low frequency band signal and the high frequency band signal from another frequency by another processing manner.
[0101] 402: Attenuate the high frequency band signal, or a characteristic parameter of the high frequency band signal to be encoded, according to an energy attenuation value of the low frequency band signal, where the energy attenuation value indicates the energy attenuation of the low frequency band signal caused by the encoding of the low frequency band signal.
[0102] Prior to this step, the method further includes a step of determining a signal class of the high frequency band signal of the current frame, where the signal class can be determined, in particular, by using the signal class determination method provided in the prior art or the signal class determination method provided in the aforementioned embodiment of the present invention, which does not affect the implementation of the present invention.
[0103] The high frequency band signal of the current frame may be a high frequency band time domain signal of the current frame, or a high frequency band frequency domain signal of the current frame, and the characteristic parameter to be encoded of the high frequency band signal of the current frame may be an energy characteristic parameter to be encoded of the high frequency band signal, in particular, may be a time domain envelope to be encoded or a frequency domain envelope to be encoded of the high frequency band signal of the current frame.
[0104] The high frequency band signal or the characteristic parameters to be coded of the high frequency band signal may be attenuated specifically according to the energy attenuation value and the signal class of the high frequency band signal of the current frame. In another implementation, the encoder can attenuate the high frequency band signals of all signal classes or the characteristic parameters to be coded of those high frequency band signals. However, since the signal classes of the current frame are various, the attenuated high frequency band signals of the current frame or the characteristic parameters to be coded of the high frequency band signals of the current frame may also be various. For details, please refer to the description of the embodiment shown in FIG. 5. In yet another implementation, only some classes of signals are attenuated or only certain classes of signals are attenuated, which does not affect the implementation of the present invention.
[0105] In one particular implementation, the signal classes of the high frequency band signal of the current frame may include a noise class, a predicted class, a transition class, a harmonic class, and a normal class, and in another particular implementation, the signal classes of the high frequency band signal of the current frame may include a noise class, a predicted class, a transition class, a harmonic class, a fricative class, and a voiced class. The difference between the signal classes in the two particular implementations is that in the latter implementation, the normal class is divided into a fricative class and a voiced class.
[0106] The manner of obtaining the energy attenuation value includes, but is not limited to, the following two manners.
[0107] First mode: the encoder encodes the low frequency band signal of the current frame, locally decodes the result of encoding the low frequency band signal, and uses the ratio of the energy of the low frequency band signal to the energy of the signal obtained by locally decoding as the energy attenuation value. The energy attenuation value thus determined is the most accurate.
[0108] Second aspect: the energy attenuation value is preset in the encoder, and the energy attenuation value is obtained according to the ratio between the energy of multiple low-frequency band signals of the same class frame and the energy of the signal obtained by decoding the result of encoding the low-frequency band signal of the same class frame, which can be in particular to obtain a value by training according to these ratios by using the LBG algorithm, and to use this value as the energy attenuation value, where the same class frame is a data frame of the same signal class as the high-frequency band signal of the current frame.
[0109] In this way, corresponding energy attenuation values can be preset for all signal classes, or corresponding energy attenuation values can be preset only for signal classes that require attenuation. For example, in one particular implementation, if only signals of the fricative class need to be attenuated, then it is only necessary to preset the energy attenuation values of signals of the fricative class.
[0110] 403: Encode the attenuated high-frequency band signal or the attenuated characteristic parameter of the high-frequency band signal to be encoded.
[0111] The encoder in the embodiment of the present invention attenuates the high-frequency band signal or the characteristic parameter to be encoded of the high-frequency band signal according to the energy attenuation value of the low-frequency band signal of the current frame, encodes the attenuation result and sends it to the decoder, and the energy of the high-frequency band signal obtained by the decoder through decoding is attenuated accordingly. In this way, the high-frequency band signal is comfortable to the user's ear after being combined with the low-frequency band signal, thereby improving the user experience.
[0112] The technical solutions provided in the aforementioned embodiments of the present invention are described in detail below through the embodiment shown in FIG.
[0113] 501: An encoder encodes a low-frequency band signal of a current frame, locally decodes a result of encoding the low-frequency band signal, and uses a ratio between the energy of the low-frequency band signal and the energy of the signal obtained by locally decoding as an energy attenuation value of the low-frequency band signal of the current frame.
[0114] 502: The encoder determines the signal class of the high frequency band signal of the current frame.
[0115] The signal class may be determined, inter alia, by using the signal class determining method provided in the prior art or the signal class determining method provided in the aforementioned embodiments of the present invention.
[0116] 503: The encoder attenuates the high frequency band signal of the current frame or the characteristic parameter to be encoded of the high frequency band signal according to the signal class of the high frequency band signal of the current frame and the energy attenuation value.
[0117] In this step, regardless of the signal class of the current frame, the encoder uses the energy attenuation value to attenuate the energy of the high frequency band signal, but for different signal classes, different processing manners are used. In particular, if the class of the high frequency band signal of the current frame is a transition class, the high frequency band time domain signal or the time domain envelope of the high frequency band signal to be coded is attenuated according to the energy attenuation value, and if the class of the high frequency band signal of the current frame is a fricative class, a harmonic class, or a normal class, the high frequency band frequency domain signal or the frequency domain envelope of the high frequency band signal to be coded is attenuated according to the energy attenuation value.
[0118] 504: An encoder encodes the attenuation result and the ID of the signal class of the high frequency band signal of the current frame to obtain a bitstream.
[0119] 505: The encoder sends the bitstream.
[0120] The encoder in this embodiment of the present invention attenuates the high-frequency band signal of the current frame or the characteristic parameters of the high-frequency band signal to be encoded according to the energy attenuation value of the low-frequency band signal of the current frame, encodes the attenuation result and sends it to the decoder, so that the energy of the high-frequency band signal obtained by the decoder through decoding is attenuated accordingly, in this way, the high-frequency band signal is comfortable to the user's ear after being combined with the low-frequency band signal, thereby improving the user experience.
[0121] Alternatively, in a particular implementation, a data frame of a particular class can be attenuated, for example, when an encoder uses a CELP algorithm to encode a low-frequency band signal of a particular data frame, if the high-frequency band signal of the data frame is a transition class, the low-frequency band signal of the data frame generally has a subframe in which an energy jump occurs, and the low-frequency band signal of the data frame is generally considered to be a transition class as well. The CELP algorithm heavily attenuates the low-frequency band signal of the transition class and slightly attenuates the low-frequency band signal of other classes, and in such a case, the attenuation of the low-frequency band signal of other classes can be ignored, and only the attenuation of the low-frequency band signal of the transition class is taken into account, and in that case, only if the high-frequency band signal of the current frame is a transition class, the high-frequency band time domain signal of the current frame or the time domain envelope of the high-frequency band signal to be coded is attenuated. That is, the high-frequency band time domain signal of the current frame or the time domain envelope of the high-frequency band signal to be coded is attenuated.
[0122] Alternatively, in yet another specific implementation form, not only the high-frequency band signal of the transition class needs to be attenuated, but also the high-frequency band signal of the fricative class needs to be attenuated. Since the normal class can be further divided into a fricative class and a voiced class, when the encoder encodes the low-frequency band signal of the voiced class by using the CELP algorithm, the encoding results in a small energy attenuation, and when the encoder encodes the low-frequency band signal of the fricative class, the encoding results in a large energy attenuation. Therefore, prior to encoding the high-frequency band signal of a data frame, if the encoder determines that the high-frequency band signal of the data frame is a fricative class, the encoder needs to attenuate the high-frequency band frequency domain signal of the fricative class or the frequency domain envelope of the high-frequency band signal of the fricative class to be encoded. That is, the high-frequency band frequency domain signal of the fricative class or the frequency domain envelope of the high-frequency band signal of the fricative class to be encoded is attenuated.
[0123] In the above embodiment, the energy attenuation value of the low-frequency band signal of the current frame used by the encoder is the ratio between the energy of the low-frequency band signal of the current frame and the energy of the signal obtained by locally decoding the result of encoding the low-frequency band signal by the encoder.Alternatively, in another specific implementation form, for various signal classes, various energy attenuation values can be obtained by training by using the LBG algorithm, and then the obtained energy attenuation values are preset in the encoder and the decoder, for example, when the signal classes of the high-frequency band signal include a noise class, a predicted class, a transition class, a harmonic class, and a normal class, one energy attenuation value is obtained by training for the noise class, one energy attenuation value is obtained by training for the predicted class, one energy attenuation value is obtained by training for the transition class, and one energy attenuation value is obtained by training for the normal class. A specific manner of obtaining one energy attenuation value corresponding to a specific signal class by training may be to obtain a ratio between the energy of multiple low-frequency band signals of the signal class and the energy of a signal obtained by decoding the result of encoding the corresponding low-frequency band signal by a decoder, obtain one value by training according to these obtained ratios by using the LBG algorithm, and use this value as the energy attenuation value corresponding to the signal class. In yet another specific implementation form, when the normal signal class is further divided into a fricative class and a voiced class, the energy attenuation values for the fricative class and the voiced class are obtained by training by using the LBG algorithm and preset in the encoder and the decoder. Alternatively, when only the high-frequency band signals of some signal classes need to be attenuated, for example, when only the high-frequency band signals of the transition class and the fricative class are attenuated, it is only necessary to preset the energy attenuation values corresponding to the transition class and the fricative class, and it is not necessary to preset the energy attenuation values corresponding to other classes.
[0124] Referring to FIG. 6, an embodiment of the present invention provides a decoding method, including:
[0125] 601: Decode a bitstream to obtain a high frequency band signal of a current frame or a characteristic parameter of the high frequency band signal of the current frame.
[0126] This embodiment of the invention is implemented by a decoder.
[0127] The high frequency band signal of the current frame may be a high frequency band time domain signal of the current frame or a high frequency band frequency domain signal of the current frame, and the characteristic parameter of the high frequency band signal of the current frame may be a time domain envelope or a frequency domain envelope of the high frequency band signal of the current frame.
[0128] 602: Attenuate a high frequency band signal, or a characteristic parameter of the high frequency band signal, according to an energy attenuation value of a low frequency band signal of a current frame, where the energy attenuation value indicates an energy attenuation of the low frequency band signal caused by encoding the low frequency band signal.
[0129] The high-frequency band signal or the characteristic parameters of the high-frequency band signal can be attenuated according to the energy attenuation value of the low-frequency band signal of the current frame and the signal class of the high-frequency band signal of the current frame, in particular. In another implementation, the decoder can attenuate the high-frequency band signals of all signal classes, or all the characteristic parameters of the high-frequency band signals, but since the signal classes of the current frame are various, the attenuated high-frequency band signals of the current frame, or the attenuated characteristic parameters of the high-frequency band signals of the current frame can also be various. For details, please refer to the description of the embodiment shown in Figure 7. In yet another implementation, only some classes of signals are attenuated, or only a specific class of signals are attenuated, which does not affect the implementation of the present invention.
[0130] For the classification of the signal class of the high frequency band signal, reference is made to the detailed description of the embodiment shown in FIG. 4, and therefore the details will not be described again here.
[0131] Obtaining the energy attenuation value of the low frequency band signal of the current frame includes, but is not limited to, the following two aspects.
[0132] First mode: the decoder analyzes the bit stream sent by the encoder to obtain the energy attenuation value, that is, the energy attenuation value of the low-frequency band signal of the current frame is obtained by the encoder and sent to the decoder, and in particular, the encoder can use as the energy attenuation value the ratio between the energy of the low-frequency band signal of the current frame and the energy of the signal obtained by locally decoding the result of encoding the low-frequency band signal of the current frame by the encoder.
[0133] Second aspect: an energy attenuation value of the low frequency band signal of the current frame is preset in the decoder, and this energy attenuation value is obtained according to a ratio between the energy of a plurality of low frequency band signals of frames of the same class and the energy of the signal obtained by decoding the result of encoding the low frequency band signal of a frame of the same class, which can in particular be to obtain a value by training according to these ratios by using the LBG algorithm, and to use this value as the energy attenuation value, where the frames of the same class are data frames of the same signal class as the high frequency band signal of the current frame.
[0134] The decoder in this embodiment of the present invention attenuates the characteristic parameters of the high frequency band signal, or the high frequency band signal obtained by decoding, according to the energy attenuation value of the low frequency band signal of the current frame, so that the finally obtained high frequency band signal is comfortable to the user's ear after being combined with the low frequency band signal, thereby improving the user experience.
[0135] The technical solutions provided in the foregoing embodiments of the present invention are described in detail below via the embodiment shown in FIG.
[0136] 701: A decoder receives a bitstream sent by an encoder, where the bitstream includes a result of encoding a high frequency band signal, an energy attenuation value of a low frequency band signal of a current frame, and an ID of a signal class of a high frequency band signal of a current frame.
[0137] 702: A decoder decodes a bitstream to obtain an energy attenuation value of a low frequency band signal of a current frame, a signal class of a high frequency band signal of the current frame, and a characteristic parameter of the high frequency band signal of the current frame or the high frequency band signal of the current frame.
[0138] 703: The decoder attenuates the high-frequency band signal of the current frame or a characteristic parameter of the high-frequency band signal of the current frame according to the energy attenuation value of the low-frequency band signal of the current frame and the signal class of the high-frequency band signal of the current frame.
[0139] In this embodiment, regardless of the signal class of the current frame, the decoder attenuates the energy of the high-frequency band signal using the energy attenuation value of the low-frequency band signal of the current frame, but different processing manners are used for different signal classes. In particular, if the class of the high-frequency band signal of the current frame is a transition class, the high-frequency band time domain signal or the time domain envelope of the high-frequency band signal is attenuated according to the energy attenuation value of the low-frequency band signal of the current frame, and if the class of the high-frequency band signal of the current frame is a fricative class, a harmonic class, or a normal class, the high-frequency band frequency domain signal or the frequency domain envelope of the high-frequency band signal is attenuated according to the energy attenuation value of the low-frequency band signal of the current frame.
[0140] The decoder in an embodiment of the present invention attenuates characteristic parameters of the high frequency band signal of the current frame or the high frequency band signal obtained by decoding, so that the final high frequency band signal is comfortable to the user's ear after being combined with the low frequency band signal, thereby improving the user experience.
[0141] Alternatively, in one particular implementation, the decoder can attenuate only a specific class of signal, for example, the decoder attenuates the high-frequency band time-domain signal of the current frame or the time-domain envelope of the high-frequency band signal only if the high-frequency band signal of the current frame is of the transition class, i.e., the high-frequency band time-domain signal of the current frame or the time-domain envelope of the high-frequency band signal is attenuated.
[0142] Alternatively, in yet another particular implementation form, not only the high frequency band signal of the transition class needs to be attenuated, but also the high frequency band signal of the fricative class needs to be attenuated. For this, the decoder obtains the high frequency band signal of the fricative class by decoding, and then attenuates the high frequency band signal of the fricative class. That is, the high frequency band signal of the fricative class is attenuated. Alternatively, the decoder obtains the frequency domain envelope of the high frequency band signal of the fricative class by decoding, and then attenuates the frequency domain envelope of the high frequency band signal of the fricative class. That is, the high frequency band signal of the fricative class is attenuated.
[0143] In the above embodiment, the energy attenuation value of the low frequency band signal of the current frame is sent by the encoder to the decoder, alternatively, in another specific implementation, the energy attenuation value can be preset in the decoder, that is, different energy attenuation values can be obtained for different signal classes by training by using the LBG algorithm, and then the obtained energy attenuation values are preset in the encoder and the decoder.This specific implementation is similar to the description of the corresponding part above, and therefore the details are not described again here.
[0144] Referring to FIG. 8, one embodiment of the present invention comprises: a splitting unit 100 configured to split a current frame into a low frequency band signal and a high frequency band signal; a correction unit 200 configured to attenuate a high frequency band signal or a characteristic parameter of the high frequency band signal to be coded according to an energy attenuation value of a low frequency band signal, the energy attenuation value being indicative of an energy attenuation of the low frequency band signal caused by coding of the low frequency band signal of a current frame, the correction unit 200 comprising: A correction unit 200, in which the high-frequency band signal of the current frame can be a high-frequency band time-domain signal of the current frame or a high-frequency band frequency-domain signal of the current frame, and the characteristic parameter to be coded of the high-frequency band signal of the current frame can be an energy characteristic parameter to be coded of the high-frequency band signal, in particular, can be a time-domain envelope to be coded or a frequency-domain envelope to be coded of the high-frequency band signal of the current frame; and an encoding unit 300 configured to encode the attenuated high frequency band signal or the attenuated characteristic parameter to be encoded of the high frequency band signal.
[0145] To determine the signal class of the high frequency band signal of the current frame, the encoding device further includes a signal class determination unit 400 configured to determine the signal class of the high frequency band signal of the current frame, in which case the correction unit 200 is configured to attenuate the high frequency band signal, or the characteristic parameter to be encoded of the high frequency band signal, according to the energy attenuation value and the signal class of the high frequency band signal.
[0146] The correction unit 200 is particularly configured to attenuate the high-frequency band time domain signal, or the time-domain envelope of the high-frequency band signal to be encoded, according to an energy attenuation value if the class of the high-frequency band signal is a transition class, and / or to attenuate the high-frequency band frequency domain signal, or the frequency-domain envelope of the high-frequency band signal to be encoded, according to an energy attenuation value if the class of the high-frequency band signal is a fricative class, a harmonic class, or a normal class.
[0147] To obtain the energy attenuation value of the current frame, the encoding device may further include an energy attenuation value obtaining unit 500 configured to encode a low frequency band signal, further locally decode the result of encoding the low frequency band signal, and further use the ratio of the energy of the low frequency band signal and the energy of the signal obtained by locally decoding as the energy attenuation value, or an energy attenuation value setting unit 600 configured to set the energy attenuation value of the current frame, where the energy attenuation value is obtained according to the ratio of the energy of a plurality of low frequency band signals of frames of the same class and the energy of the signal obtained by decoding the result of encoding the low frequency band signals of frames of the same class, where the frames of the same class are data frames of the same signal class as the high frequency band signal of the current frame. It should be noted that although the energy attenuation value obtaining unit 500 and the energy attenuation value setting unit 600 are illustrated in Fig. 8, the encoding device may include the energy attenuation value obtaining unit 500 but not the energy attenuation value setting unit 600, or may include the energy attenuation value setting unit 600 but not the energy attenuation value obtaining unit 500 in actual use.
[0148] The encoding device in this embodiment of the present invention attenuates the high-frequency band signal, or the characteristic parameters to be decoded from the high-frequency band signal, according to the energy attenuation value of the low-frequency band signal of the current frame, and further encodes and sends the attenuation result to the decoder, so that the energy of the high-frequency band signal obtained by the decoder through decoding is attenuated accordingly, in this way, the high-frequency band signal is comfortable to the user's ear after being combined with the low-frequency band signal, thereby improving the user experience.
[0149] Referring to FIG. 9, one embodiment of the present invention comprises: a decoding unit 700 configured to decode the bitstream to obtain a high frequency band signal of the current frame or a characteristic parameter of the high frequency band signal of the current frame; and a correction unit 800 configured to attenuate the high frequency band signal, or a characteristic parameter of the high frequency band signal, in response to an energy attenuation value of the low frequency band signal of the current frame, the energy attenuation value indicating the energy attenuation of the low frequency band signal caused by encoding the low frequency band signal of the current frame.
[0150] To obtain the signal class of the high frequency band signal of the current frame, the decoding unit 700 is further configured to decode the bitstream to obtain the signal class of the high frequency band signal of the current frame, and the correction unit 800 is further configured to attenuate the high frequency band signal, or a characteristic parameter of the high frequency band signal, according to the energy attenuation value and the signal class of the high frequency band signal of the current frame.
[0151] In particular, the correction unit 800 is particularly configured to attenuate the high-frequency band time domain signal, or the time domain envelope of the high-frequency band signal, according to the energy attenuation value if the class of the high-frequency band signal of the current frame is a transition class, and / or the correction unit is particularly configured to attenuate the high-frequency band frequency domain signal, or the frequency domain envelope of the high-frequency band signal, according to the energy attenuation value if the class of the high-frequency band signal of the current frame is a fricative class, a harmonic class, or a normal class.
[0152] To obtain the energy attenuation value of the current frame, the decoding unit 700 is further configured to decode an energy attenuation value from the bitstream, where the energy attenuation value indicates a ratio between the energy of the low frequency band signal of the current frame and the energy of a signal obtained by locally decoding a result of encoding the low frequency band signal of the current frame by an encoder.
[0153] Alternatively, to obtain the energy attenuation value of the current frame, the decoding device further includes an energy attenuation value setting unit 900 configured to set an energy attenuation value of the current frame, the energy attenuation value being obtained according to a ratio of the energy of a low frequency band signal of a frame of the same class to the energy of a signal obtained by decoding the result of encoding the low frequency band signal of a frame of the same class, the frame of the same class being a data frame of the same signal class as the high frequency band signal of the current frame.
[0154] The decoding device in this embodiment of the present invention attenuates the characteristic parameters of the high frequency band signal, or the high frequency band signal obtained by decoding, according to the energy attenuation value of the low frequency band signal of the current frame, so that the finally obtained high frequency band signal is comfortable to the user's ear after being combined with the low frequency band signal, thereby improving the user experience.
[0155] It will be understood by those skilled in the art that all or part of the steps in the methods according to these embodiments can be implemented by a program instructing relevant hardware. The program can be stored in a computer-readable storage medium, such as a read-only memory, a magnetic disk, or an optical disk.
[0156] The signal classification method and device, and the encoding and decoding method and device according to the embodiments of the present invention are described in detail above. The principle and implementation of the present invention are described herein through specific examples. The description of these embodiments is merely provided to facilitate understanding of the method and core idea of the present invention. Those skilled in the art can make various modifications and variations of the present invention with respect to the specific embodiments and application scope according to the idea of the present invention. Therefore, the specification should not be interpreted as limiting the present invention. [Explanation of symbols]
[0157] 10 division units 20 Judgment Unit 30 Judgment Unit 31 Noise Classification Unit 32 predicted class decision units 33 Harmonic Class Judgment Unit
Claims
1. A signal classification method, The steps include: dividing the current frame into a low-frequency band signal and a high-frequency band signal; A step of determining whether the encoding / decoding characteristic parameter of the current frame corresponding to a signal class satisfies the value requirements of the pre-configured encoding / decoding characteristic parameter, wherein the pre-configured encoding / decoding characteristic parameter corresponding to the signal class includes the encoding / decoding characteristic parameter corresponding to the predicted class. The steps include determining the signal class of the high-frequency band signal of the current frame according to the determination result, and A method of having.
2. The process further includes determining whether the number of subbands in the high-frequency band signal of the current frame that have a peak-to-average ratio smaller than a second threshold is greater than a second predetermined number. The step of determining the signal class of the high-frequency band signal of the current frame is: The method according to claim 1, further comprising the step of determining that the signal class of the high-frequency band signal of the current frame is the noise class, if the number of subbands having a peak-to-average ratio smaller than the second threshold is greater than a second predetermined number, and the value of the coding / decoding characteristic parameter of the current frame corresponding to the noise class satisfies the value requirement of the pre-set coding / decoding characteristic parameter corresponding to the noise class.
3. The process further includes determining whether the number of subbands in the high-frequency band signal of the current frame that have a peak-to-average ratio greater than a first threshold is greater than a first predetermined number. If the pre-configured coding / decoding characteristic parameters corresponding to the signal class include coding / decoding characteristic parameters corresponding to the harmonic class, the step of determining the signal class of the high-frequency band signal of the current frame is: The method according to claim 1, further comprising the step of determining that the signal class of the high-frequency band signal of the current frame is the harmonic class if the number of subbands having a peak-to-average ratio greater than the first threshold is greater than a first predetermined number, and the value of the coding / decoding characteristic parameter of the current frame corresponding to the harmonic class satisfies the value requirement of the pre-set coding / decoding characteristic parameter corresponding to the harmonic class.
4. The process further includes determining whether the number of subbands in the high-frequency band signal of the current frame that have a peak-to-average ratio greater than a first threshold is greater than a first predetermined number. If the pre-configured coding / decoding characteristic parameters corresponding to the signal class include the coding / decoding characteristic parameters corresponding to the predicted class, the step of determining the signal class of the high-frequency band signal of the current frame is: The method according to claim 1, further comprising the step of determining that the signal class of the high-frequency band signal of the current frame is the predicted class, if the number of subbands having a peak-to-average ratio greater than the first threshold is less than or equal to the first predetermined number, and the value of the coding / decoding characteristic parameter of the current frame corresponding to the predicted class satisfies the value requirement of the pre-set coding / decoding characteristic parameter corresponding to the predicted class.
5. The method according to claim 1, further comprising the step of dividing the entire frequency band time-domain signal of the current frame into N subframes, and determining that the signal class of the high-frequency band signal of the current frame is a transition class if the energy of one subframe is greater than a predetermined multiple of the energy of the subframe preceding that subframe.