Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Example one
Referring to fig. 3, an embodiment of the present invention provides a method for denoising a signal, including:
step 31, selecting at least two spectral coefficients with high correlation with the spectral coefficients to be adjusted according to the inter-frame correlation of the frame where the spectral coefficients to be adjusted are located;
step 32, weighting the selected at least two spectral coefficients and the spectral coefficient to be adjusted to obtain a predicted value of the spectral coefficient to be adjusted;
and step 33, performing spectrum adjustment on the decoded signal by using the acquired prediction value, and outputting the adjusted decoded signal.
The signal denoising method provided by the embodiment of the invention obtains the predicted value of the spectral coefficient to be adjusted by weighting at least two related spectral coefficients of the spectral coefficient to be adjusted, adjusts the frequency spectrum of the decoded signal according to the predicted value of the spectral coefficient to be adjusted, and makes the predicted spectral coefficient (i.e. the predicted value of the spectral coefficient to be adjusted) adapt to other related spectral coefficients, so that the spectral coefficients obtained from different quantization precisions adapt to each other, the smoothness of the frequency spectrum of the decoded signal is increased, the noise of frequency band synthesis after decoding is reduced, and the audio signal after frequency band synthesis can achieve better auditory effect.
Example two
Referring to fig. 4, a method for denoising a signal according to an embodiment of the present invention includes:
and step 41, determining the spectral coefficient to be adjusted in the decoded signal according to the quantization precision of the spectral coefficient.
At the decoding end, after the core decoder, the BWE decoder and the dequantization decoder respectively decode the received encoded signals, a decoded signal is output, wherein the decoded signal is composed of a low-frequency signal output by the core decoder, a bandwidth extension high-frequency signal output by the BWE decoder and other high-frequency signals output by the dequantization decoder, and the bandwidth extension high-frequency signal output by the BWE decoder and the other high-frequency signals output by the dequantization decoder are frequency domain signals. The determined spectral coefficients to be adjusted may include: the unquantized spectral coefficients and/or the spectral coefficients with quantization accuracy lower than a certain quantization accuracy threshold, where the quantization accuracy threshold can be set according to the requirement.
For example, for scalar quantization, if the minimum bit rate of a decoded signal is 1 bit/bin, when a bin corresponds to only 1bit of spectral coefficient (that is, the bit rate of the bin is 1 bit/bin), the 1bit can only represent symbol information of the bin, and no bit (that is, 0bit) represents amplitude information of the bin, so that the bin with the bit rate of 1 bit/bin has no amplitude size information (it can be considered that the quantization precision of the bin is 0), and the bin is not quantized, and the bin with the bit rate of 1 bit/bin is determined to be the bin to be adjusted. For vector quantization, the average quantization precision of the vector where the frequency point is located can be determined first, and if the quantization precision is smaller than a certain lower threshold, such as 0.5 bit/frequency point, it is determined that all frequency points in the vector need to be adjusted; if the average quantization precision is larger than a certain upper limit threshold value, such as 2 bit/frequency point, all frequency points in the vector are determined not to need to be adjusted; if the average quantization precision is between the two, such as between 0.5 bit/frequency point and 2 bit/frequency point, further judging whether frequency points exist in the vector and are not quantized by the vector, if so, determining the frequency points which are not quantized by the vector as needing to be adjusted, otherwise, not needing to be adjusted.
And 42, selecting a weighting mode from three weighting modes of high interframe correlation, low interframe correlation and middle interframe correlation according to the interframe correlation of the frame where the spectral coefficient to be adjusted is located.
The inter-frame correlation can be determined according to a correlation-related parameter, for example, a BWE algorithm, which uses the frame type to characterize the inter-frame correlation size: transient type frames represent low inter-frame correlation; the harmonic type frame represents high correlation between frames; the normal type frame represents inter-frame correlation. In the BWE algorithm, the frame type is a correlation-related parameter, and the weighting mode is determined by determining the inter-frame correlation according to the frame type.
Of course, the inter-frame correlation may also be determined by calculation, for example, the correlation between the frame where the spectral coefficient to be adjusted is located and the adjacent frame is calculated according to a certain correlation calculation method, and if the correlation is greater than the upper threshold, the inter-frame correlation of the frame where the spectral coefficient to be adjusted is located is high; if the correlation is smaller than the lower threshold, the correlation between frames in which the spectral coefficients to be adjusted are located is low; in other cases, for example, if the correlation is between the upper threshold and the lower threshold, the inter-frame correlation of the frame where the spectral coefficient to be adjusted is located is included.
In step 42, different weighting modes are selected according to the inter-frame correlation: when the inter-frame correlation is high, selecting a high inter-frame correlation weighting mode; when the inter-frame correlation is low, selecting a low inter-frame correlation weighting mode; when the inter-frame correlation is in progress, a medium inter-frame correlation weighting mode is selected. The different weighting modes correspond to different weighting weights for weighting the inter-frame spectral coefficients and the intra-frame spectral coefficients. Generally, the higher the inter-frame correlation is, the higher the weighting weight of the inter-frame spectral coefficient is, and the lower the weighting weight of the intra-frame spectral coefficient is; the lower the inter-frame correlation, the lower the weighting weight of the inter-frame spectral coefficients and the higher the weighting weight of the intra-frame spectral coefficients.
That is, the weighting of the inter-frame spectral coefficients is proportional to the inter-frame correlation, and the weighting of the intra-frame spectral information is inversely proportional to the inter-frame correlation. For the frame with high inter-frame correlation, the inter-frame spectral coefficient weight is larger, and the intra-frame spectral coefficient weight is smaller or set to zero; for the frame with low inter-frame correlation, the intra-frame spectral coefficient weight is larger, and the inter-frame spectral coefficient weight is smaller or is set to zero; for a frame with intermediate inter-frame correlation, the magnitude of the intra and inter spectral coefficient weights may be determined by the high-low ratio of the inter-frame and intra-frame correlation.
At step 43, at least two spectral coefficients having a high correlation with the spectral coefficients to be adjusted are determined according to the selected weighting pattern.
When the weighting pattern is selected in step 42, the determination of the at least two spectral coefficients having high correlation with the spectral coefficients to be adjusted according to the weighting pattern may be: when the high inter-frame correlation weighting mode is selected, the inter-frame correlation is high, and at least two spectral coefficients can be determined from frames adjacent to the frame where the spectral coefficient to be adjusted is located; when the low inter-frame correlation weighting mode is selected, the inter-frame correlation is low, and at least two spectral coefficients can be determined from the frame where the spectral coefficients to be adjusted are located; when the intermediate inter-frame correlation weighting mode is selected, the inter-frame correlation is indicated to be intermediate, and at this time, at least two spectral coefficients can be determined from the frame where the spectral coefficient to be adjusted is located and the frame adjacent to the frame where the spectral coefficient to be adjusted is located at the same time.
And step 44, weighting the determined at least two spectral coefficients and the spectral coefficient to be adjusted to obtain a predicted value of the spectral coefficient to be adjusted.
The determined at least two spectral coefficients and the spectral coefficient to be adjusted are weighted according to a prediction method using at least one of the following information: 1. dequantizing the quantized spectral coefficients output by the decoder; bandwidth spread spectrum coefficient output by BWE decoder; 3. there are prediction values for the spectral coefficients obtained by the prediction. Wherein, the product of the spectral coefficient and the corresponding weighting weight is the weighting value of the spectral coefficient; since the spectral coefficient to be adjusted may be a spectral coefficient corresponding to an unquantized frequency point, when at least two spectral coefficients and the spectral coefficient to be adjusted are weighted in step 44, the weighted value of the spectral coefficient to be adjusted may be 0, that is, the predicted value of the spectral coefficient to be adjusted is obtained only by using the determined weighted values of the at least two spectral coefficients.
Specifically, for the high inter-frame correlation weighting mode, the spectral coefficients are predicted according to the weighting value of at least one of the following information: (1) a prediction value of a previous frame; (2) quantized spectral coefficients of a previous frame; (3) the bandwidth of the previous frame is spread over the spectral coefficients.
For the low inter-frame correlation weighting mode, predicting the spectral coefficients according to the weighting value of at least one of the following information: (1) quantized spectral coefficients of the current frame; (2) bandwidth spread spectrum coefficient of the current frame; (3) the current frame has a prediction value.
And predicting the spectral coefficients according to the weighted values of at least one of the following information in the middle-to-inter correlation weighting mode: (1) the existing predicted value of the previous frame or the current frame; (2) quantized spectral coefficients of a previous or current frame; (3) bandwidth-extended spectral coefficients of a previous frame or a current frame.
It should be noted that the weighting weight of each kind of spectrum information may also be adjusted correspondingly according to the quantization precision of the frequency point to be adjusted. When weighting prediction is carried out, if the spectral coefficient to be adjusted has a quantization result, the quantization result can still be weighted and predicted, and the weighting weight is in direct proportion to the quantization precision of the spectral coefficient.
And step 45, controlling the energy of the obtained predicted value, and performing frequency spectrum adjustment on the decoded signal.
The method comprises the steps of firstly determining an upper threshold of the energy of the spectral coefficient to be adjusted, and then controlling the energy of the adjusted spectral coefficient within a range smaller than or equal to the upper threshold. The upper threshold may be determined according to a quantization error or a minimum non-zero quantization value of a range in which the spectral coefficient to be adjusted is located, where the quantization error or the minimum non-zero quantization value may be obtained by the prior art, and is not described herein again.
Controlling the energy of the obtained predicted value, and performing spectral adjustment on the decoded signal may be: and correcting the predicted value of the spectral coefficient to be adjusted according to the upper limit threshold value to obtain a corrected value of the spectral coefficient to be adjusted, wherein the energy of the corrected value is in a range smaller than or equal to the upper limit threshold value, and the decoded signal is subjected to spectral adjustment by using the corrected value, wherein the corrected value is equal to the predicted value when the predicted value is smaller than or equal to the upper limit threshold value, and the corrected value is equal to the upper limit threshold value when the predicted value is larger than the upper limit threshold value.
Specifically, if the predicted spectral coefficient energy of the frequency point is greater than the upper threshold of the spectral coefficient energy to be adjusted, the quantization error min _ D or the minimum quantization value (the minimum amplitude value of the zero point is not included in the quantized spectral coefficient) min _ Q of the frequency point is extracted (or estimated) as the upper threshold thr, and the threshold coefficient a (a < ═ 1) is determined according to the actual situation. And if the energy of the predicted value of the spectral coefficient to be adjusted is larger than a multiplied by thr, adjusting the energy of the predicted value to be smaller than or equal to the multiplied by thr. Here, the threshold coefficient a may be determined by using an empirical value obtained by experimental statistics, or the magnitude of a may be controlled by quantization accuracy.
And the lower the quantization precision is, the larger the value of the threshold coefficient a is, and when the quantization precision is higher than a certain frequency point, the value of the threshold coefficient a is controlled from 1 to a certain numerical value smaller than 1. For example, when the quantization precision is higher than 1.5 bit/bin, let thr be min _ D, and a be 0.7; when the quantization precision is lower than 0.5 bit/frequency point, setting thr to be min _ Q and a to be 1; when the quantization precision is greater than 0.5 bit/frequency point and less than 1.5 bit/frequency point, thr is set to min _ D, and a is set to 1.
By the signal denoising method provided by the invention, the spectral coefficient to be adjusted is determined by the quantization precision of the spectral coefficient, different weighting modes are selected according to the inter-frame correlation of the frame where the spectral coefficient to be adjusted is located, determining at least two spectral coefficients having a high correlation with the spectral coefficients to be adjusted according to the selected weighting pattern, weighting the spectral coefficient to be adjusted to obtain a predicted value of the spectral coefficient to be adjusted, controlling the energy of the obtained predicted value, the decoded signal is spectrally modified such that the predicted spectral coefficients (i.e. the predicted values of the spectral coefficients to be modified) are adapted to other associated spectral coefficients, therefore, the spectral coefficients obtained by different quantization precisions are mutually adaptive, the smoothness of the frequency spectrum of the decoded signal is increased, the noise of frequency band synthesis after decoding is reduced, and the audio signal after frequency band synthesis can achieve better auditory effect.
EXAMPLE III
The embodiment provides a method for performing weighted prediction on a spectral coefficient to be adjusted, which describes spectral information that can be used in different weighting modes, and includes:
suppose that: the method comprises the following steps that intra-frame frequency spectrum information is f _ inner [ N ], intra-frame weighting weight is w _ inner [ N ], inter-frame frequency spectrum information is f _ inter [ N ], inter-frame weighting weight is w _ inter [ N ], N is more than or equal to 0 and less than or equal to N, and N is the maximum frequency point number of one frame; if the spectral coefficient of the frequency point n is the spectral coefficient to be adjusted, the predicted value f [ n ] of the spectral coefficient of the frequency point n is expressed by a formula as shown in formula 1:
f [ N ] + w _ inner [ N ] x f _ inner [0] + w _ inner [1] x f _ inner [1] +. + -. + w _ inner [ N ] x f _ inner [ N ] + w _ inner [0] x f _ inter [0] + w _ inter [1] x f _ inter [1] + -. + w _ inter [ N ] x f _ inter [ N ] 1
Wherein the weighted weight w _ inner [ n ] within a frame is proportional to the intra-frame correlation; the weighting weight w _ inter [ n ] between frames is proportional to the correlation between frames; and the sum of all the weighted weights is 1.
The following describes how to perform weighted prediction on spectral coefficients to be adjusted by using a specific example.
Assuming that a quantized spectral coefficient fQ [ n ] of a frequency point n in the current frame is determined as a spectral coefficient to be adjusted, and a bandwidth extended spectral coefficient of the frequency point n in the current frame is fB [ n ]; the quantized spectral coefficient of the middle frequency point n in the last frame of the current frame is represented as fS [1] [ n ], and the quantized spectral coefficient of the middle frequency point n in the last frame is represented as fS [0] [ n ]; the prediction of the quantized spectral coefficient of the frequency point n in the current frame is f [ n ]. The above spectral coefficients or predicted values may be 0 or non-zero numbers, and when fQ [ n ] is zero, it means that the frequency point n is not quantized.
If it is determined that a frequency point 17 needs to be adjusted according to step 41 in the second embodiment, and a different weighting mode is selected for the frame where the frequency point is located according to step 42, the following processing may be performed for different weighting mode situations, where the frequency point 16 and the frequency point 18 are adjacent to the frequency point 17:
A. for low inter-frame correlation weighting modes:
if fQ [17] is not quantized, f [17] is (fB [17] + fQ [16] + fQ [18])/3, at this time, fB [17], fQ [16], fQ [18] are determined spectral coefficients with high correlation with the spectral coefficients to be adjusted, the weighting weights of B [17], fQ [16], fQ [18] are 1/3, 1/3, 1/3 respectively, and the meanings in the other weighting prediction formulas below are similar thereto and are not described again;
if fQ [17] quantization accuracy is low, f [17] = (0.4 × fB [17] + fQ [17] +0.8 × fQ [16] +0.8 × fQ [18 ])/3;
B. for high inter-frame correlation weighting modes:
if fQ [17] is unquantized, then f [17] ═ (fS [0] [17] + fS [1] [17 ])/2;
if fQ [17] quantization precision is low, then
f[17]=(0.3×fS[0][17]+0.7×fS[1][17]+fQ[17])/2;
C. For the mid-to-frame correlation weighting mode:
if fQ [17] is unquantized, then f [17] ═ (fB [17] + fQ [16] + fQ [18] + fS [1] [16] + fS [1] [17] + fS [1] [18 ])/6;
if fQ [17] quantization precision is low, f [17] is equal to
(2.5×fB[17]+fQ[16]+fQ[18]+0.5×fS[1][16]+0.5×fS[1][17]+0.5×fS[1][18])/6。
The weighting weight and the value frequency point ranges in the above example are both from experimental results, that is, empirical values, and in practical applications in different scenes, the selection of the weighting weight and the value frequency point may be different due to different scenes, for example, different core encoders will have different bandwidth extension ranges. Therefore, the specific values of the inter-frame spectrum information, the value range of the intra-frame spectrum information and the weighting weight can be determined according to experiments of different scenes.
The method for performing weighted prediction on the spectral coefficients to be adjusted provided by the third embodiment adopts specific weighting weights, spectral coefficients and calculation formulas, and these specific weighting weights, spectral coefficients and calculation formulas are only a better implementation manner obtained according to empirical values, and do not limit the protection scope of the present invention. The method for performing weighted prediction on the spectral coefficient to be adjusted provided by the third embodiment of the present invention can be applied to each embodiment of the present invention, and performs weighted prediction on the spectral coefficient to be adjusted, and obtains a predicted value of the spectral coefficient to be adjusted.
In another embodiment of the present invention, a signal denoising method is provided, which is described by taking BWE algorithm and 8-dimensional lattice vector quantization as an example, but not limited thereto, and the method provided in the embodiment of the present invention may also be applied to other vector quantization, such as 4-dimensional quantization.
Firstly, an upper limit threshold value thr [ i ] of the amplitude of the spectral coefficient to be adjusted in the 8-dimensional vector is calculated, wherein i represents the ith 8-dimensional vector. If the ith 8-dimensional vector is an all-zero vector, thr [ i ] is equal to the weight multiplied by the frequency domain envelope value of the frequency band, the frequency domain envelope value can be the weighted sum or the average value of the amplitude values of two or more continuous frequency domain coefficients, and the weighting coefficient can be obtained by a window function or other arithmetic formulas; if the ith 8-dimensional vector is not an all zero vector, thr [ i ] is equal to the weight multiplied by the smallest non-zero quantized value within the vector. Here, the two weights may be empirical values obtained by experiments.
For convenience of description, the frame where the spectral coefficients to be adjusted are located is referred to as the current frame hereinafter.
If the current frame and the previous frame are both harmonic frames, there is a high inter-frame correlation. When the vector of the current frame has a spectral coefficient to be decoded and the vector of the corresponding frequency band of the current frame has no spectral coefficient to be decoded, the method for restoring the spectral coefficient to be adjusted may be: if the amplitude of the quantized spectral coefficient of the previous frame is greater than the amplitude of the quantized spectral coefficient corresponding to the previous frame by a given multiple (e.g., two times), the amplitude of the spectral coefficient to be adjusted is the weighted sum of the amplitude of the BWE spectral coefficient of the current frame and the amplitude of the quantized spectral coefficient corresponding to the previous frame, and the sign is the sign of the BWE spectral coefficient of the current frame; otherwise, that is, if the amplitude of the quantized spectral coefficient corresponding to the previous frame of the previous frame is not greater than the amplitude of the quantized spectral coefficient corresponding to the previous frame by a given multiple, the amplitude of the spectral coefficient to be adjusted is the weighted sum of the amplitude of the quantized spectral coefficient corresponding to the previous frame of the previous frame, the amplitude of the quantized spectral coefficient corresponding to the previous frame, and the amplitude of the BWE spectral coefficient of the current frame, and the sign is the sign of the BWE spectral coefficient of the current frame.
If the current frame or the previous frame is a transient frame, there is low inter-frame correlation. If the spectral coefficient of a frequency point is not decoded, the method for recovering the spectral coefficient to be adjusted of the frequency point may be: and solving a weighted average En of the amplitude of the BWE spectral coefficient of the current frequency point and the amplitude of the quantized spectral coefficient of the adjacent frequency point as the amplitude of the spectral coefficient to be adjusted. The current frequency point is the frequency point where the spectral coefficient to be adjusted is located, and may be called as a frequency point to be adjusted, and the adjacent frequency points may be one or more frequency points with a frequency higher or lower than that of the frequency point to be adjusted in the same frame. If En is larger than threshold thr [ i ], setting En as thr [ i ], i.e. setting the amplitude of the spectral coefficient to be adjusted as thr [ i ]. The symbol of the spectral coefficient to be adjusted is the symbol of the BWE spectral coefficient of the frequency point. And multiplying the amplitude of the spectral coefficient to be adjusted by the symbol of the spectral coefficient to be adjusted as the adjustment result of the frequency point.
If the current frame type does not belong to the above two cases, i.e. has a medium to medium correlation. If the spectral coefficient of a frequency point is not decoded, the method for recovering the spectral coefficient to be adjusted of the frequency point may be: and weighting and averaging the amplitude of the BWE spectral coefficient of the current frequency point, the amplitude of the BWE spectral coefficient of the frequency point adjacent to the current frequency point in the current frame, the amplitude of the quantized spectral coefficient of the frequency point corresponding to the previous frame of the current frame and the amplitude of the quantized spectral coefficient of the frequency point adjacent to the frequency point corresponding to the previous frame to obtain an average value En, wherein the average value En is used as the amplitude of the spectral coefficient to be adjusted. The current frequency point is the frequency point where the spectral coefficient to be adjusted is located, and may be called as a frequency point to be adjusted, and the adjacent frequency points may be one or more frequency points with a frequency higher or lower than that of the frequency point to be adjusted in the same frame. If En is larger than threshold thr [ i ], setting En as thr [ i ], i.e. setting the amplitude of the spectral coefficient to be adjusted as thr [ i ]. The symbol of the spectral coefficient to be adjusted is the symbol of the BWE spectral coefficient of the frequency point. And multiplying the amplitude of the spectral coefficient to be adjusted by the symbol of the spectral coefficient to be adjusted as the frequency point adjustment result.
The weighting coefficients in the weighting operation are different for the zeros in the all-zero vector and the non-all-zero vector so as to control the adjustment degree of the spectral coefficients, so that the auditory resolution of the quantized spectral coefficients is not influenced, and extra noise is not introduced.
Example four
On the basis of the foregoing method embodiment, the present invention further provides an embodiment of a signal denoising apparatus, referring to fig. 5, including:
a selecting unit 51, configured to select at least two spectral coefficients with high correlation with the spectral coefficients to be adjusted according to the inter-frame correlation of the frame where the spectral coefficients to be adjusted are located;
the weighting unit 52 is configured to weight the at least two spectral coefficients selected by the selecting unit 51 and the spectral coefficient to be adjusted to obtain a predicted value of the spectral coefficient to be adjusted;
and an adjustment output unit 53 for performing spectrum adjustment on the decoded signal using the prediction value acquired by the weighting unit 52, and outputting the adjusted decoded signal.
Before the selecting unit 51 selects at least two spectral coefficients with high correlation with the spectral coefficients to be adjusted according to the inter-frame correlation of the frame where the spectral coefficients to be adjusted are located, the spectral coefficients to be adjusted are determined according to the quantization encoding precision of the spectral coefficients. The device therefore further comprises:
a prediction point determining unit 50, configured to determine a spectral coefficient to be adjusted according to quantization encoding precision of the spectral coefficient, where the determined spectral coefficient to be adjusted includes: spectral coefficients that are not quantized, and/or spectral coefficients that have a quantization precision below a quantization precision threshold.
In one embodiment, the selecting unit 51 includes:
a weighting mode selection module 511, configured to select a weighting mode from three weighting modes, i.e., high inter-frame correlation, low inter-frame correlation, and medium inter-frame correlation, according to the inter-frame correlation of the frame in which the spectral coefficient to be adjusted is located;
a relevant spectrum selecting module 512, configured to determine at least two spectrum coefficients with high relevance to the spectrum coefficient to be adjusted according to the weighting mode selected by the weighting mode selecting module 511.
The weighting unit 52 includes any one of the following modules:
the high correlation weighting module 521 is configured to, for the weighting mode of high inter-frame correlation, obtain a predicted value of the spectral coefficient to be adjusted according to a weighting value of at least one of the following information: (1) a prediction value of a previous frame; (2) quantized spectral coefficients of a previous frame; (3) bandwidth extension spectral coefficients of previous frames; or,
the low correlation weighting module 522 is configured to, for the weighting mode of low inter-frame correlation, obtain a predicted value of the spectral coefficient to be adjusted according to a weighting value of at least one of the following information: (1) quantized spectral coefficients of the current frame; (2) bandwidth spread spectrum coefficient of the current frame; (3) the existing predicted value of the current frame; or,
the middle correlation weighting module 523 is configured to, in the weighting mode of the middle inter-frame correlation, obtain a predicted value of the spectral coefficient to be adjusted according to a weighting value of at least one of the following information: (1) a prediction value of a previous frame or a current frame; (2) quantized spectral coefficients of a previous or current frame; (3) bandwidth-extended spectral coefficients of a previous frame or a current frame.
It should be noted that the weighting weight of the spectral information used in each of the above related weighting modules is controlled by the quantization precision of the spectral coefficient to be adjusted, and the higher the quantization precision of the spectral information is, the larger the corresponding weighting weight is, and the weighting weight is proportional to the quantization precision of the spectral coefficient. The product of the spectral coefficient and the corresponding weighting weight is the weighting value of the spectral coefficient.
Therefore, the weighting unit 52 further includes:
the weight control module 520 is configured to control a weighting weight of the spectral information according to the quantization precision of the spectral coefficient to be adjusted, where the higher the quantization precision of the spectral information is, the larger the corresponding weighting weight is.
If the predicted spectral coefficient energy of the frequency point is larger than the upper threshold of the spectral coefficient energy to be adjusted, the energy of the adjusted spectral coefficient needs to be controlled within the range smaller than or equal to the upper threshold. Therefore, the adjustment output unit 53 further includes:
a correction module 530, configured to generate a correction value of the spectral coefficient to be adjusted according to the upper threshold of the spectral coefficient energy to be adjusted and the obtained prediction value, and perform spectral adjustment on the decoded signal by using the correction value; the energy of the corrected value of the spectral coefficient to be adjusted is less than or equal to the upper threshold of the energy of the spectral coefficient to be adjusted.
According to the signal denoising device provided by the embodiment of the invention, the weighting unit weights at least two related spectral coefficients selected by the selection unit on the spectral coefficient to be adjusted to obtain the predicted value of the spectral coefficient to be adjusted, and the adjustment output unit adjusts the frequency spectrum of the decoded signal according to the predicted value of the spectral coefficient to be adjusted and then outputs the adjusted decoded signal; the predicted spectral coefficient (namely the predicted value of the spectral coefficient to be adjusted) is adaptive to other related spectral coefficients, so that the spectral coefficients obtained by different quantization precisions are adaptive to each other, the smoothness of the frequency spectrum of a decoded signal is increased, the noise of frequency band synthesis after decoding is reduced, and the audio signal after frequency band synthesis can achieve a better auditory effect.
EXAMPLE five
On the basis of the above device embodiment, an embodiment of the present invention further provides an audio decoding system, see fig. 6, including a core decoder 61, a bandwidth extension decoder 62, a dequantization decoder 63, and a signal denoising device 60, where the core decoder 61 is configured to decode information of a low-frequency first layer code stream; the bandwidth expansion decoder 62 is configured to decode information of the bandwidth expanded second layer code stream; the dequantization decoder 63 is configured to decode information of a third layer code stream of dequantized high-frequency band remaining bits;
the signal denoising device 60 may be the signal denoising device provided in the above embodiment of the present invention, and is configured to receive the decoded information output by the bandwidth extension decoder and the dequantization decoder, determine a spectral coefficient to be adjusted according to the information of the decoded second layer code stream and the decoded third layer code stream, and adjust the spectral coefficient in the information of the decoded third layer code stream according to the obtained predicted value of the spectral coefficient to be adjusted. More specifically, reference may be made to the above-mentioned embodiments of the apparatus, which are not described in detail herein.
It should be noted that the method in the embodiment of the present invention may be implemented in the form of a software functional module, and the software functional module may also be stored in a computer readable storage medium when the software functional module is sold or used as a stand-alone product. The storage medium mentioned above may be a read-only memory, a magnetic or optical disk, etc.
Each functional unit in the embodiments of the present invention may be integrated into one processing module, or each unit may exist alone physically, or two or more units are integrated into one module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode. The integrated module, if implemented in the form of a software functional module and sold or used as a stand-alone product, may also be stored in a computer readable storage medium. The storage medium mentioned above may be a read-only memory, a magnetic or optical disk, etc.
The above-described embodiments are not intended to limit the present invention, and any modifications, equivalent substitutions, improvements, etc. that may be made by one of ordinary skill in the art without departing from the spirit of the present invention are intended to be included within the scope of the present invention.