Spectrum quantization, encoding method and encoder
By correcting and updating the spectral quantization coefficients, the problem of excessive computation in the LC3 encoder was solved, achieving high efficiency and accuracy in the spectral quantization process.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-02-08
- Publication Date
- 2026-03-27
AI Technical Summary
The computational load of the spectrum quantization module in the LC3 encoder is too high, resulting in an excessive computational burden on the device.
By directly reading the predicted value from the previous frame's spectral quantization process, the spectral quantization predicted value is corrected using simple calculations, the corrected quantization coefficients are obtained, and the updated quantization coefficients are obtained when necessary, and then spectral quantization is performed.
It effectively reduces the computational load of the spectrum quantization process, improves the efficiency and accuracy of spectrum quantization, and is suitable for various spectrum quantization scenarios.
Smart Images

Figure CN116614626B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of wireless communication technology, specifically to a spectrum quantization, coding method, and encoder. Background Technology
[0002] LC3 (Low Complexity Communication Codec) is a frequency domain encoder capable of encoding speech and music at various bit rates and can be incorporated into any Bluetooth audio profile. With the development of Bluetooth Low Energy technology, LC3 has been widely adopted. This technology primarily utilizes free / open advanced audio codecs to implement the standard audio encoding format listed as LE Audio (Low Energy Audio). However, when LC3 is used in practical device deployments, the standard algorithm implementation often results in excessive computational complexity, making it difficult for related devices to handle. Therefore, the standard algorithm of the spectral quantization module in the LC3 encoder suffers from excessive computational complexity. Summary of the Invention
[0003] In view of this, this application provides a spectrum quantization, encoding method and encoder to solve the problem of excessive computation in existing standard algorithms for spectrum quantization modules.
[0004] This application provides a spectrum quantization method, including:
[0005] S110: Read the spectrum quantization prediction value from the spectrum quantization coefficients predicted in the previous frame's spectrum quantization process;
[0006] S120, the spectrum quantization prediction value is corrected according to the energy level of multiple consecutive frames of spectrum to obtain the corrected quantization coefficient;
[0007] S130, the modified quantization coefficients are used to perform spectral quantization on the audio to be encoded.
[0008] Optionally, the spectrum quantization method further includes: obtaining a judgment factor characterizing the level of spectrum change in each frame; and determining whether the quantized spectrum meets the requirements based on the judgment factor.
[0009] Optionally, the spectrum quantization method further includes: if the quantized spectrum does not meet the requirements, obtaining an updated quantization coefficient based on the relationship between the judgment factor and a preset factor threshold; and using the updated quantization coefficient to perform spectrum quantization.
[0010] Optionally, obtaining the updated quantization coefficient based on the relationship between the judgment factor and the preset factor threshold includes: if the quantization spectrum is less than the factor threshold, then the corrected quantization coefficient is modified to obtain the updated quantization coefficient; if the quantization spectrum is greater than or equal to the factor threshold, then the current quantization coefficient is estimated using a static estimation process to obtain the updated quantization coefficient.
[0011] Optionally, the spectral quantization method further includes: predicting the spectral quantization coefficients corresponding to the audio to be encoded in the next frame based on the quantization coefficients used in the current frame and / or the quantization coefficients of the frames preceding the current frame.
[0012] Optionally, the step of correcting the spectral quantization prediction value based on the energy level of consecutive multi-frame spectra includes: obtaining the spectral energy of each frame of the spectrum, calculating the energy change rate based on each spectral energy; if the energy change rate is less than a preset change rate threshold, correcting the spectral quantization prediction value using the energy change rate and a preset correction formula; if the energy change rate is greater than or equal to the change rate threshold, estimating the current quantization coefficient using a static estimation process to obtain an estimated quantization coefficient, so that in step S130, the estimated quantization coefficient is used to perform spectral quantization on the audio to be encoded.
[0013] Optionally, the correction formula includes: ,in, This indicates the corrected quantization coefficient. This represents the spectral quantization prediction value. Represents the rate of change of energy. This represents the correction factor.
[0014] Optionally, the spectrum quantization method further includes: S140, determining whether the spectrum quantization prediction value exists; if yes, then execute step S110; if no, then execute step S150; S150, estimating the current quantization coefficient using a static estimation process to obtain the estimated quantization coefficient, so that in step S130, the estimated quantization coefficient is used to perform spectrum quantization on the audio to be encoded.
[0015] This application also provides an encoding method, including:
[0016] The audio to be encoded is quantized using any of the above-mentioned spectral quantization methods to obtain the quantized spectrum.
[0017] Data encoding is performed based on the quantized spectrum.
[0018] This application also provides an encoder, including an encoding circuit; the encoding circuit is used to perform any of the above-described spectral quantization methods or any of the above-described encoding methods.
[0019] The spectrum quantization, encoding method, and encoder described in this application can directly read the spectrum quantization prediction value generated in the previous spectrum quantization process, correct the spectrum quantization prediction value using a relatively simple calculation method, and obtain the corrected quantization coefficients required for subsequent spectrum quantization. This allows for fast and accurate spectrum quantization of the audio to be encoded, effectively reducing the computational load in the spectrum quantization process and improving spectrum quantization efficiency.
[0020] It can also obtain judgment factors that characterize the level of spectral change in each frame, and determine whether the quantized spectrum meets the requirements based on the judgment factors. If the requirements are met, the corrected quantization coefficients are used to perform spectral quantization on the audio to be encoded, thereby improving the efficiency of spectral quantization. If the requirements are not met, updated quantization coefficients are obtained and the spectral quantization is performed again using the updated quantization coefficients. In addition to reducing the amount of computation in the spectral quantization process and improving the efficiency of spectral quantization, it can also improve the accuracy of the spectral quantization process.
[0021] If, during a long audio encoding process, a sudden change in scene or other specific circumstances occurs, causing drastic changes in the audio spectrum characteristics, i.e., when an error occurs in the quantization spectrum, the quantization coefficients can be re-estimated, and accurate quantization coefficients can be used to re-quantize the spectrum, determining a new quantization prediction value. This makes the above quantization method applicable to multiple quantization scenarios, enabling high-precision quantization in each scenario. Attached Figure Description
[0022] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0023] Figure 1 This is a schematic diagram of the traditional spectrum quantization method.
[0024] Figure 2 This is a schematic flowchart of a spectrum quantization method according to an embodiment of this application;
[0025] Figure 3 This is a schematic diagram of a spectrum quantization method according to another embodiment of this application;
[0026] Figure 4 This is a schematic diagram of the spectrum quantization system structure according to an embodiment of this application. Detailed Implementation
[0027] To address the issue of excessive computational complexity in the standard algorithm implementation of the spectrum quantization module in the LC3 encoder, the inventors discovered that the traditional spectrum quantization process can be referenced... Figure 1As shown, each spectrum quantization process involves the following steps: obtaining the corresponding estimated quantization coefficients using a static estimation process; performing spectrum quantization using the estimated quantization coefficients to obtain the quantization error; determining whether the quantization error meets the requirements or is too large. If the quantization error is too large, adjusting the quantization coefficients and performing spectrum quantization using the adjusted quantization coefficients. In the corresponding encoder, the standard spectrum quantization module accounts for more than 15% of the computational workload of the entire encoding process, with the quantization coefficient evaluation algorithm accounting for more than 70% of the computational workload, indicating that a significant computational burden still exists.
[0028] To address the aforementioned issues, the spectrum quantization, encoding method, and encoder provided in this application can directly read the spectrum quantization prediction values generated in the previous spectrum quantization process, correct the spectrum quantization prediction values using a relatively simple calculation method, and obtain the corrected quantization coefficients required for subsequent spectrum quantization. This allows for fast and accurate spectrum quantization of the audio to be encoded, effectively reducing the computational load in the spectrum quantization process and improving spectrum quantization efficiency.
[0029] The technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application. In the absence of conflict, the following embodiments and their technical features can be combined with each other.
[0030] The first aspect of this application provides a spectral quantization method, applied to audio encoding devices such as encoders. (Reference) Figure 1 As shown, the spectral quantization method includes S110 to S130.
[0031] S110: Read the predicted spectrum quantization value from the spectrum quantization coefficients predicted in the previous frame's spectrum quantization process.
[0032] In audio systems, spectral features are continuous over time. Therefore, when performing spectral quantization on the spectrum of each frame, at least one quantization parameter (such as spectral quantization coefficient) and / or relevant historical parameters of the corresponding frame can be used to predict the spectral quantization coefficient of the next frame. This allows the required spectral quantization prediction value to be directly obtained when performing spectral quantization on the next frame, thus improving the efficiency of obtaining the spectral quantization prediction value.
[0033] S120, the spectrum quantization prediction value is corrected according to the energy level of multiple consecutive frames of spectrum to obtain the corrected quantization coefficient.
[0034] Specifically, the quantization coefficients of spectral quantization are correlated with the energy level of the spectrum. The energy level of the spectrum changes continuously in adjacent frames. Therefore, the predicted value of the quantization coefficients can be corrected based on the energy of the spectrum in several adjacent frames. The corrected value can be used as the corresponding quantization coefficient for spectral quantization of the audio to be coded. Thus, the corrected quantization coefficients can be determined as the quantization coefficients used in the above-mentioned spectral quantization. While ensuring the accuracy of the spectral quantization process, the computational workload in the determination of quantization coefficients can be simplified.
[0035] S130, the modified quantization coefficients are used to perform spectral quantization on the audio to be encoded.
[0036] The above-mentioned spectrum quantization method directly reads the spectrum quantization prediction value generated in the previous spectrum quantization process, and uses a relatively simple calculation method to correct the spectrum quantization prediction value to obtain the corrected quantization coefficients required for subsequent spectrum quantization. This method can quickly and accurately perform spectrum quantization on the audio to be encoded, effectively reducing the amount of computation in the spectrum quantization process and improving spectrum quantization efficiency.
[0037] In some application scenarios, the spectral characteristics during the spectrum quantization process may change instantaneously, exceeding the corresponding historical prediction range. In such cases, it may be difficult to accurately quantize the spectrum using the aforementioned corrected quantization coefficients.
[0038] Considering these phenomena in the above application scenarios, in one embodiment, the spectrum quantization method further includes: obtaining a judgment factor characterizing the level of spectrum change in each frame; and determining whether the quantized spectrum meets the requirements based on the judgment factor.
[0039] This embodiment obtains a judgment factor characterizing the level of spectral change in each frame. Based on the judgment factor, it determines whether the quantized spectrum meets the requirements. If the requirements are met, the spectral quantization process of using the corrected quantization coefficients to quantize the audio to be encoded in step S130 is used to ensure the efficiency of spectral quantization. If the requirements are not met, the updated quantization coefficients are obtained and the spectral quantization is re-performed using the updated quantization coefficients. This not only reduces the computational load of the spectral quantization process and improves the efficiency of spectral quantization, but also improves the accuracy of the spectral quantization process.
[0040] Optionally, the formula for calculating the above-mentioned judgment factor may include:
[0041] ),
[0042] in, Indicates the judgment factor. () indicates the absolute value. This represents the budgeted value indicating the number of available bits. This represents the actual number of bits after quantization. Indicates the reference standard, The formula for determining delta includes: delta = ( +48) / 16.
[0043] Optionally, the judgment factor can also characterize the quantization error (the error corresponding to the quantization spectrum). When the judgment factor is less than or equal to a preset error threshold, it indicates that the quantization spectrum meets the requirements. When the judgment factor is greater than the error threshold, it indicates that the quantization spectrum does not meet the requirements.
[0044] In one example, the spectral quantization method further includes:
[0045] If the quantization spectrum does not meet the requirements, then the updated quantization coefficient is obtained based on the relationship between the judgment factor and the preset factor threshold.
[0046] The updated quantization coefficients are used for spectral quantization.
[0047] The relationship between the aforementioned judgment factor and factor threshold can characterize the degree of deviation of the corrected quantization coefficient. If the deviation of the corrected quantization coefficient is relatively weak, the updated quantization coefficient can be obtained with relatively little computation. If the deviation of the corrected quantization coefficient is relatively strong, it is necessary to re-estimate the quantization coefficient to obtain a more accurate and higher updated quantization coefficient. This example obtains the updated quantization coefficient based on the relationship between the judgment factor and factor threshold, which improves the flexibility in obtaining the updated quantization coefficient and minimizes the computational load in the spectrum quantization process while ensuring the accuracy of the spectrum quantization process.
[0048] In one example, obtaining the updated quantization coefficient based on the relationship between the judgment factor and a preset factor threshold includes:
[0049] If the quantization spectrum is less than the factor threshold, then the corrected quantization coefficient is modified to obtain the updated quantization coefficient;
[0050] If the quantization spectrum is greater than or equal to the factor threshold, the current quantization coefficient is estimated using a static estimation process to obtain the updated quantization coefficient.
[0051] Optionally, the factor threshold can be set to a value of 6.1 or higher.
[0052] Optionally, the process of correcting the correction quantization coefficient includes: obtaining the spectral energy of each frame spectrum, and correcting the correction quantization coefficient using the energy change rate and a preset correction formula.
[0053] In one embodiment, the spectrum quantization method further includes: predicting the spectrum quantization coefficients corresponding to the audio to be encoded in the next frame based on the quantization coefficients used in the current frame (such as correcting quantization coefficients, estimating quantization coefficients, or updating quantization coefficients, etc.) and / or the quantization coefficients of the frames before the current frame, so that the spectrum quantization prediction value can be directly read when the spectrum quantization is performed in the next frame, thereby ensuring the efficiency of obtaining the spectrum quantization prediction value.
[0054] In this embodiment, after the spectral quantization of the current frame is completed, the quantization coefficients of the next frame are predicted using the current quantization coefficients and the historical quantization coefficients (quantization coefficients of each frame before the current frame). This yields the spectral quantization prediction value corresponding to the audio to be encoded in the next frame. The computational load of this process of obtaining the spectral quantization prediction value is effectively controlled, allowing the spectral quantization of the next frame to directly read the spectral quantization prediction value. After making a relatively small correction to the spectral quantization prediction value, the required quantization coefficients are obtained for corresponding spectral quantization. This can further reduce the computational load of the spectral quantization process and improve the efficiency of the spectral quantization process.
[0055] Optionally, in this embodiment, the quantization coefficients used in the current frame are used to predict the spectral quantization coefficients corresponding to the audio to be encoded in the next frame, thereby obtaining the spectral quantization prediction value, which greatly reduces the computational load in the process of determining the spectral quantization prediction value. Optionally, a weighted linear regression operation can be performed on the quantization coefficients of the previous N frames with the current frame as the last frame to obtain the spectral quantization prediction value corresponding to the audio to be encoded in the next frame. Optionally, if the quantization coefficients of the previous N-1 frames do not satisfy the linear regression algorithm, the quantization coefficients of the current frame can be used as the spectral quantization prediction value corresponding to the audio to be encoded in the next frame.
[0056] Optionally, weighted linear regression prediction may include the following formula:
[0057] ,
[0058] Where n represents the nth frame, and N represents the number of frames to be regressed. This represents the predicted value of the spectral quantization coefficients in the (n+1)th frame, i.e., the predicted spectral quantization value for the next frame. This represents the actual spectral quantization coefficient of the ni-th frame, where N can take values from 4 to 8.
[0059] In one embodiment, correcting the spectral quantization prediction value based on the energy levels of consecutive multi-frame spectra includes:
[0060] Obtain the spectral energy of each frame's spectrum, and calculate the energy change rate based on each spectral energy;
[0061] If the energy change rate is less than a preset change rate threshold, the spectrum quantization prediction value is corrected using the energy change rate and a preset correction formula.
[0062] If the energy change rate is greater than or equal to the change rate threshold, the current quantization coefficient is estimated using a static estimation process to obtain the estimated quantization coefficient, which is then used in step S130 to perform spectral quantization on the audio to be encoded.
[0063] Optionally, the rate of change threshold can be set to a value of 4.6 or similar.
[0064] In this embodiment, if the energy change rate is less than the preset change rate threshold, the energy change rate and the preset correction formula are used to correct the spectral quantization prediction value, which can reduce the amount of calculation in the process of obtaining the corrected quantization coefficient. If the energy change rate is greater than or equal to the change rate threshold, it indicates that the spectral characteristics change too much. At this time, it is necessary to return to the static evaluation process to estimate the quantization coefficient to ensure the accuracy of the obtained quantization coefficient.
[0065] The spectral energy of a given frame can include the sum of the absolute values of the spectral data in that frame. In this case, the formula for calculating the spectral energy can include: , This indicates the spectral energy of the frame. This indicates finding the absolute value. This represents the first valid value of the spectrum of this frame. This indicates the last non-zero value in the spectrum of this frame.
[0066] Optionally, when calculating the energy change rate of the nth frame spectrum, the energy change rate is calculated based on the spectral energy corresponding to the (n-1)th frame spectrum. Optionally, the formula for calculating the energy change rate includes:
[0067] ,
[0068] in, This represents the rate of energy change corresponding to the spectrum of the nth frame. This represents the spectral energy corresponding to the current frame's spectrum. This represents the spectral energy corresponding to the previous frame's spectrum. This indicates that the minimum value is being sought.
[0069] Optionally, the correction formula includes:
[0070] ,
[0071] in, This indicates the corrected quantization coefficient. This represents the spectral quantization prediction value. Represents the rate of change of energy. This represents the correction factor, which can be 10.0 or similar.
[0072] In one embodiment, the spectrum quantization method further includes:
[0073] S140, determine whether the spectrum quantization prediction value exists. If yes, proceed to step S110; otherwise, proceed to step S150.
[0074] S150, the current quantization coefficients are estimated using a static estimation process to obtain estimated quantization coefficients, which are then used in step S130 to perform spectral quantization on the audio to be encoded.
[0075] In the aforementioned spectrum quantization process, the first frame of spectrum in continuous spectrum quantization processes, such as the first frame, often lacks a spectrum quantization prediction value. In this case, a static estimation process is used to estimate the current quantization coefficients, obtaining estimated quantization coefficients. In step S130, these estimated quantization coefficients are used for spectrum quantization of the audio to be encoded, ensuring the reliability of the spectrum quantization process. In continuous spectrum quantization processes, subsequent frames often have spectrum quantization prediction values. In this case, the spectrum quantization prediction values are directly read, and a relatively simple calculation method is used to correct them, obtaining the corrected quantization coefficients required for the current frame's spectrum quantization. This allows for fast and accurate spectrum quantization of the audio to be encoded, effectively reducing the computational load in the spectrum quantization process.
[0076] In one example, the above spectral quantization method can also be referenced. Figure 3 As shown, the process includes the following:
[0077] S201. Determine if a spectral quantization prediction value exists. If yes, proceed to step S202; otherwise, proceed to step S205.
[0078] S202, Calculate the energy change rate; this step can obtain the spectral energy of each frame and calculate the energy change rate based on the spectral energy of each frame.
[0079] S203, determine whether the rate of change of energy is less than the rate of change threshold. If yes, proceed to step S204; otherwise, proceed to step S205.
[0080] S204, Correct the spectral quantization prediction value, such as by using the energy change rate and correction formula to correct the spectral quantization prediction value.
[0081] S205, obtain the estimated quantization coefficients, such as using a computationally intensive estimation scheme like a static estimation process to estimate the required estimated quantization coefficients.
[0082] S206, Spectrum quantization, such as using the corrected spectrum quantization prediction value (i.e., the corrected quantization coefficient) or the estimated quantization coefficient for spectrum quantization.
[0083] S207, determine whether the quantization error meets the requirements. If it does, proceed to step S213. If it does not meet the requirements, further determine whether the quantization spectrum is too large or incorrect. If the quantization spectrum is too large, proceed to step S211. If the quantization spectrum is incorrect, proceed to step S208. Specifically, this step can use a judgment factor to characterize the quantization error. For example, when the judgment factor is less than or equal to a preset error threshold, it indicates that the quantization error meets the requirements. When the judgment factor is greater than the error threshold, it indicates that the quantization error does not meet the requirements. If the judgment factor is less than the factor threshold, it indicates that the quantization spectrum is too large. If the judgment factor is greater than or equal to the factor threshold, it indicates that the quantization spectrum is incorrect, and so on.
[0084] S208, Re-estimate the quantization coefficients, such as by using a static estimation process to re-estimate the current required quantization coefficients.
[0085] S209, Spectrum quantization, such as using estimated quantization coefficients for spectrum quantization.
[0086] S211, Adjust the quantization coefficients, such as by using the energy change rate and correction formula to correct the quantization coefficients used in the previous spectrum quantization process (e.g., correct the quantization coefficients or estimate the quantization coefficients).
[0087] S212, Spectrum quantization, such as using adjusted quantization coefficients for spectrum quantization.
[0088] S213, predict new spectral quantization prediction values, such as using the current quantization coefficients and historical quantization coefficients to predict the quantization coefficients of the next frame, to obtain spectral quantization prediction values.
[0089] The spectral quantization method provided in this example can meet the accuracy requirements of most spectral quantization scenarios by predicting new spectral quantization coefficients and correcting the corresponding spectral quantization prediction values. The static evaluation of the entire spectral quantization coefficient only needs to be calculated once when the estimated quantization coefficient is obtained in the first frame, which can effectively simplify the corresponding calculation process and reduce the amount of computation. If, during a long audio encoding process, specific situations such as sudden scene changes occur, causing drastic changes in the audio spectral characteristics, i.e., when the quantized spectrum is incorrect, the quantization coefficients can be re-estimated, and accurate quantization coefficients can be used again for spectral quantization to determine new spectral quantization prediction values. This makes the above spectral quantization method applicable to multiple spectral quantization scenarios, and can perform spectral quantization with high accuracy in each scenario. Actual music scene tests show that, without sacrificing quantization accuracy, the probability of re-estimating quantization coefficients during continuous spectral quantization is relatively low, sometimes even less than 1% or lower. Therefore, the above spectral quantization method has high reliability while simplifying the calculation process and reducing the amount of computation.
[0090] The above spectral quantization method can directly read the spectral quantization prediction values generated in the previous spectral quantization process, correct these prediction values using a relatively simple calculation method, and obtain the corrected quantization coefficients required for subsequent spectral quantization. This allows for fast and accurate spectral quantization of the audio to be encoded, effectively reducing the computational load and improving quantization efficiency. It can also obtain judgment factors characterizing the spectral change level of each frame, determining whether the quantized spectrum meets the requirements based on these factors. If the requirements are met, the corrected quantization coefficients are used for spectral quantization of the audio to be encoded, improving quantization efficiency. If the requirements are not met, updated quantization coefficients are obtained and used for re-quantization. This reduces the computational load and improves efficiency while also enhancing accuracy. Furthermore, if a sudden scene change or other specific situation occurs during long-term audio encoding, causing drastic changes in the audio spectral characteristics (i.e., errors in quantized spectrum), the quantization coefficients can be re-estimated, and accurate quantization can be used again to determine new spectral quantization prediction values. This makes the above spectral quantization method applicable to multiple spectral quantization scenarios, enabling high-precision quantization in each scenario.
[0091] A second aspect of this application provides an encoding method, comprising:
[0092] The spectral quantization method described in any of the above embodiments is used to quantize the audio to be encoded to obtain the quantized spectrum;
[0093] Data encoding is performed based on the quantized spectrum.
[0094] The above encoding method uses the spectral quantization method described in any of the above embodiments to perform spectral quantization on the audio to be encoded, which can simplify the operation process corresponding to spectral quantization, reduce the amount of computation, thereby reducing the amount of computation in the encoding process and improving encoding efficiency.
[0095] A third aspect of this application provides a spectrum quantization system, with reference to... Figure 4 As shown, the above-mentioned spectrum quantization system includes:
[0096] Reading module 110 is used to read the spectrum quantization prediction value;
[0097] Correction module 120 is used to correct the spectrum quantization prediction value to obtain the corrected quantization coefficient;
[0098] The spectrum quantization module 130 is used to perform spectrum quantization on the audio to be encoded using the corrected quantization coefficients.
[0099] For specific limitations regarding the spectrum quantization system, please refer to the limitations on the spectrum quantization method above, which will not be repeated here. Each module in the aforementioned spectrum quantization system can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in hardware or independent of the computing module in the computer device, or stored in software in the memory of the computer device, so that the computing module of the computer device can call and execute the operations corresponding to each module.
[0100] A fourth aspect of this application provides an encoder, including an encoding circuit; the encoding circuit is used to perform the spectral quantization method or the encoding method described in any of the above embodiments.
[0101] The encoder described above can perform frequency quantization using the spectral quantization method described in any of the above embodiments, or perform audio encoding using the encoding method described in any of the above embodiments, and has high encoding efficiency.
[0102] Although this application has been shown and described with respect to one or more implementations, equivalent variations and modifications will occur to those skilled in the art based on a reading and understanding of this specification and the accompanying drawings. This application includes all such modifications and variations and is limited only by the scope of the appended claims. In particular, with respect to the various functions performed by the aforementioned components, the terminology used to describe such components is intended to correspond to any component (unless otherwise indicated) that performs the specified function of said component (e.g., is functionally equivalent to it), even if structurally not equivalent to the disclosed structure performing the functions in the exemplary implementations of this specification shown herein.
[0103] That is, the above description is only an embodiment of this application and does not limit the patent scope of this application. Any equivalent structural or procedural changes made using the content of this application’s specification and drawings, such as the combination of technical features between different embodiments, or direct or indirect application in other related technical fields, are similarly included within the patent protection scope of this application.
[0104] Furthermore, for structural elements with the same or similar characteristics, this application may use the same or different reference numerals for identification. In addition, the terms "first," "second," and "third" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Therefore, features defined with "first," "second," and "third" may explicitly or implicitly include one or more features. In the description of this application, "a plurality of" means two or more, unless otherwise explicitly specified.
[0105] In this application, the term "exemplary" is used to mean "serving as an example, illustration, or description." Any embodiment described as "exemplary" in this application is not necessarily to be construed as more preferred or advantageous than other embodiments. This application has been provided above to enable any person skilled in the art to implement and use it. Various details have been set forth in the above description for purposes of explanation. It should be understood that those skilled in the art will recognize that this application can be implemented without using these specific details. In other embodiments, well-known structures and processes will not be described in detail to avoid obscuring the description of this application with unnecessary detail. Therefore, this application is not intended to be limited to the embodiments shown, but is consistent with the broadest scope of the principles and features disclosed herein.
Claims
1. A spectral quantization method, characterized in that, The spectrum quantization method includes: S110: Read the spectrum quantization prediction value from the spectrum quantization coefficients predicted in the previous frame's spectrum quantization process; S120, the spectrum quantization prediction value is corrected according to the energy level of multiple consecutive frames of spectrum to obtain the corrected quantization coefficient; S130, the modified quantization coefficients are used to perform spectral quantization on the audio to be encoded; The step of correcting the spectral quantization prediction value based on the energy level of consecutive multi-frame spectra includes: obtaining the spectral energy of each frame of the spectrum, calculating the energy change rate based on each spectral energy; if the energy change rate is less than a preset change rate threshold, correcting the spectral quantization prediction value using the energy change rate and a preset correction formula; if the energy change rate is greater than or equal to the change rate threshold, estimating the current quantization coefficient using a static estimation process to obtain an estimated quantization coefficient, which is then used in step S130 to perform spectral quantization on the audio to be encoded.
2. The spectrum quantization method according to claim 1, characterized in that, The spectrum quantization method further includes: Obtain the judgment factors that characterize the level of spectral change in each frame; The determination factor is used to determine whether the quantization spectrum meets the requirements.
3. The spectral quantization method according to claim 2, characterized in that, The spectrum quantization method further includes: If the quantization spectrum does not meet the requirements, then the updated quantization coefficient is obtained based on the relationship between the judgment factor and the preset factor threshold. The updated quantization coefficients are used for spectral quantization.
4. The spectral quantization method according to claim 3, characterized in that, The step of obtaining the updated quantization coefficient based on the relationship between the judgment factor and the preset factor threshold includes: If the quantization spectrum is less than the factor threshold, then the corrected quantization coefficient is modified to obtain the updated quantization coefficient; If the quantization spectrum is greater than or equal to the factor threshold, the current quantization coefficient is estimated using a static estimation process to obtain the updated quantization coefficient.
5. The spectral quantization method according to claim 3, characterized in that, The spectrum quantization method further includes: Predict the spectral quantization coefficients for the next frame of audio to be encoded based on the quantization coefficients used in the current frame and / or the quantization coefficients of the frames preceding the current frame.
6. The spectral quantization method according to claim 1, characterized in that, The correction formula includes: , in, This indicates the corrected quantization coefficient. This represents the spectral quantization prediction value. Represents the rate of change of energy. This represents the correction factor.
7. The spectral quantization method according to claim 1, characterized in that, The spectrum quantization method further includes: S140, determine whether the spectrum quantization prediction value exists. If yes, proceed to step S110; otherwise, proceed to step S150. S150, the current quantization coefficients are estimated using a static estimation process to obtain estimated quantization coefficients, which are then used in step S130 to perform spectral quantization on the audio to be encoded.
8. An encoding method, characterized in that, The encoding method includes: The spectral quantization method according to any one of claims 1 to 7 is used to quantize the audio to be encoded to obtain a quantized spectrum; Data encoding is performed based on the quantized spectrum.
9. An encoder, characterized in that, It includes an encoding circuit; the encoding circuit is used to perform the spectral quantization method as described in any one of claims 1 to 7 or the encoding method as described in claim 8.
Citation Information
Patent Citations
Signal denoising method and device and audio decoding system
CN101853664A