A dynamic range control method and device, and an electronic device
By performing real-time amplitude detection and gain processing on the input signal, and only processing the gain of a portion of the amplitude to be adjusted, the problem of large computational load in dynamic range control is solved, achieving efficient signal adjustment and noise suppression.
Patent Information
- Application Number
- CN202010864198.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-08-25
- Publication Date
- 2025-11-28
- Estimated Expiration
- 2040-08-25
AI Technical Summary
In existing digital signal processing systems, the dynamic range control process involves a large amount of computation, leading to resource waste and performance bottlenecks.
By performing real-time amplitude detection on the input signal, the amplitude to be adjusted is determined, and gain processing is performed on it. The current adjustment gain is used to adjust the output of the input signal, reducing the number of amplitudes processed by gain processing and reducing the amount of computation.
It effectively reduces the amount of computation in the dynamic range control process, improves processing efficiency, avoids signal abrupt changes, and enhances the signal-to-noise ratio and perceived loudness.
Smart Images

Figure CN114094964B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of dynamic range control, more particularly, to a dynamic range control method and device and electronic equipment. BACKGROUND
[0002] In many digital signal processing systems, such as the tuning and protection system of a digital audio power amplifier, different gain layered processing needs to be performed on input signals of different amplitudes to ensure that large signals do not exceed a certain threshold, thereby avoiding damage to the loudspeaker; the energy of small and medium signals is improved to improve the loudness of the sound; and noise is effectively suppressed to improve the signal-to-noise ratio of the sound. The prior art needs to perform operations on each data point of the input signal, resulting in a large amount of computation of the entire dynamic range control (DRC). SUMMARY
[0003] Therefore, the present application provides a dynamic range control method and device and electronic equipment, which effectively improve the technical problems existing in the prior art and reduce the amount of computation in the dynamic range control process.
[0004] To achieve the above object, the technical scheme provided by the embodiments of the present application is as follows:
[0005] A dynamic range control method, comprising:
[0006] performing real-time amplitude detection on an input signal to obtain amplitude data;
[0007] determining a to-be-adjusted amplitude in the amplitude data;
[0008] performing gain processing on the to-be-adjusted amplitude to obtain a current adjustment gain;
[0009] before obtaining a next adjustment gain, adjusting and outputting the input signal using the current adjustment gain.
[0010] Optionally, determining the to-be-adjusted amplitude in the amplitude data comprises:
[0011] determining, from a plurality of amplitudes obtained in sequence from the amplitude data, a next amplitude after every preset number of amplitudes as the to-be-adjusted amplitude.
[0012] Optionally, determining the to-be-adjusted amplitude in the amplitude data comprises:
[0013] extracting a preset number of amplitudes obtained in sequence from the amplitude data as an amplitude group, and determining an amplitude with the largest absolute value in the amplitude group as the to-be-adjusted amplitude.
[0014] Optionally, performing real-time amplitude detection on an input signal to obtain amplitude data comprises:
[0015] The peak detection method or the root mean square value detection method is adopted to perform real-time amplitude detection on the input signal to obtain amplitude data.
[0016] Optionally, the gain processing is performed on the amplitude to be adjusted to obtain a current adjustment gain, including:
[0017] The current adjustment gain is calculated according to the amplitude to be adjusted, and the compression time or the release time is set based on the current adjustment gain.
[0018] Correspondingly, the application further provides a dynamic range control device, including:
[0019] An amplitude detection unit is configured to perform real-time amplitude detection on an input signal to obtain amplitude data;
[0020] A determination unit is configured to determine an amplitude to be adjusted in the amplitude data;
[0021] A gain acquisition unit is configured to perform gain processing on the amplitude to be adjusted to obtain a current adjustment gain;
[0022] In addition, a processing unit is configured to perform adjustment and output on the input signal by using the current adjustment gain before a next adjustment gain is acquired.
[0023] Optionally, the determination unit includes:
[0024] A counting module is configured to count a plurality of amplitudes acquired in sequence in the amplitude data;
[0025] In addition, a first extraction module is configured to extract a next amplitude after every preset number of amplitudes as the amplitude to be adjusted.
[0026] Optionally, the determination unit includes:
[0027] An acquisition module is configured to extract a preset number of amplitudes acquired in sequence in the amplitude data as an amplitude group;
[0028] In addition, a second extraction module is configured to extract an amplitude with the largest absolute value in the amplitude group as the amplitude to be adjusted.
[0029] Optionally, the gain acquisition unit includes:
[0030] A gain generation module is configured to calculate the current adjustment gain according to the amplitude to be adjusted;
[0031] In addition, a gain smoothing module, which sets a compression time or a release time based on the current adjusted gain.
[0032] Accordingly, the present invention also provides an electronic device, which includes the above-described dynamic range control device.
[0033] Compared with the prior art, the technical solution provided by the present invention has at least the following advantages:
[0034] This invention provides a dynamic range control method, apparatus, and electronic device, comprising: real-time amplitude detection of an input signal to acquire amplitude data; determining the amplitude to be adjusted in the amplitude data; performing gain processing on the amplitude to be adjusted to obtain a current adjustment gain; and adjusting the input signal using the current adjustment gain before acquiring the next adjustment gain. As can be seen from the above, the technical solution provided by this invention only requires gain processing on a portion of the amplitude to be adjusted in the amplitude data, and adjusts the input signal using the current adjustment gain before acquiring the next adjustment gain, thus eliminating the need to perform gain processing on all amplitude values in the amplitude data, reducing the computational load in the dynamic range control process. Attached Figure Description
[0035] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.
[0036] Figure 1 A flowchart of a dynamic range control method provided in an embodiment of the present invention;
[0037] Figure 2 A flowchart of another dynamic range control method provided in an embodiment of the present invention;
[0038] Figure 3 A flowchart of yet another dynamic range control method provided in an embodiment of the present invention;
[0039] Figure 4 This is a schematic diagram of the structure of a dynamic range control device provided in an embodiment of the present invention;
[0040] Figure 5 This is a schematic diagram of another dynamic range control device provided in an embodiment of the present invention;
[0041] Figure 6 This is a schematic diagram of the structure of another dynamic range control device provided in an embodiment of the present invention;
[0042] Figure 7 Fig. 1 is a structural schematic diagram of an electronic device provided by an embodiment of the present application. DETAILED DESCRIPTION
[0043] The technical solutions in the embodiments of the present application will be clearly and completely described with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, but not all the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by a person of ordinary skill in the art without creative work fall within the protection scope of the present application.
[0044] As described in the background, in many digital signal processing systems, such as a tuning and protection system of a digital audio power amplifier, different gain layered processing needs to be performed on input signals of different amplitudes, to ensure that a large signal does not exceed a certain threshold, thereby avoiding damage to a loudspeaker; a small signal energy is improved, to improve the listening loudness of sound; and noise is effectively suppressed, to improve the signal-to-noise ratio of sound. The prior art needs to perform operations on each data point of an input signal, resulting in a large amount of operations of the entire dynamic range control.
[0045] Based on this, the embodiments of the present application provide a dynamic range control method and device and an electronic device, which effectively improve the technical problems existing in the prior art and reduce the amount of operations in the dynamic range control process.
[0046] To achieve the above object, the technical solutions provided by the embodiments of the present application are as follows, which are specifically combined with Figures 1 to 7 The technical solutions provided by the embodiments of the present application are described in detail.
[0047] Reference Figure 1 Fig. 1 is a flowchart of a dynamic range control method provided by an embodiment of the present application, wherein the dynamic range control method comprises the following steps.
[0048] S1, performing real-time amplitude detection on an input signal to obtain amplitude data.
[0049] S2, determining a to-be-adjusted amplitude in the amplitude data.
[0050] S3, performing gain processing on the to-be-adjusted amplitude to obtain a current adjustment gain.
[0051] S4, before obtaining a next adjustment gain, adjusting and outputting the input signal by using the current adjustment gain. For example, the present application can control the input signal to be multiplied by the current adjustment gain and then output, and the present application does not make a specific limitation on this.
[0052] It can be understood that the technical scheme provided by the application only needs to perform gain processing on part of the to-be-adjusted amplitude in the amplitude data, and the input signal is adjusted and output by using the current adjustment gain before the next adjustment gain is acquired, so that gain processing is not needed for all amplitudes in the amplitude data, and the amount of calculation in the dynamic range control process is reduced.
[0053] In an embodiment of the application, amplitude detection of the input signal is preferred in the dynamic range control process. The amplitude data obtained by real-time amplitude detection of the input signal provided by the embodiment of the application comprises the following steps.
[0054] The peak detection (PeakDet) method or the root mean square value detection (RmsDet) method is used to perform real-time amplitude detection of the input signal to obtain the amplitude data, which is not specifically limited by the application, and other methods can also be used to perform amplitude detection of the input signal.
[0055] In an embodiment of the application, the to-be-adjusted amplitude is determined in the amplitude data, so that the number of amplitudes subjected to gain processing is reduced, and the amount of calculation of the dynamic range control is reduced. In the embodiment of the application, the next amplitude after every certain number of amplitudes is extracted as the to-be-adjusted amplitude to determine the parameter. That is, the to-be-adjusted amplitude in the amplitude data is determined, comprising the following steps.
[0056] In the plurality of amplitudes obtained from the amplitude data in sequence, the next amplitude after every preset number of amplitudes is determined as the to-be-adjusted amplitude.
[0057] With reference to Figure 2 The flowchart of another dynamic range control method provided by the embodiment of the application is shown in FIG. 3, wherein the dynamic range control method comprises the following steps.
[0058] S1, real-time amplitude detection of the input signal is performed to obtain amplitude data.
[0059] S2, in the plurality of amplitudes obtained from the amplitude data in sequence, the next amplitude after every preset number of amplitudes is determined as the to-be-adjusted amplitude.
[0060] S3, gain processing is performed on the to-be-adjusted amplitude to obtain a current adjustment gain.
[0061] S4, before the next adjustment gain is acquired, the input signal is adjusted and output by using the current adjustment gain.
[0062] It can be understood that, in the dynamic range control process, after receiving the input signal, the amplitude of the input signal is detected in real time to obtain amplitude data, when a certain number of amplitudes are obtained, the next amplitude obtained is determined as the amplitude to be adjusted; the gain processing is performed on the amplitude to be adjusted to obtain the current adjustment gain, and the input signal is adjusted and output by using the current adjustment gain. Thereafter, the amplitude of the input signal is still detected in real time, when a certain number of amplitudes are obtained since the last amplitude to be adjusted, the next amplitude obtained is determined as the amplitude to be adjusted again; the gain processing is performed on the amplitude to be adjusted again to obtain a new current adjustment gain, and the input signal is adjusted and output by using the current adjustment gain. The above steps are repeated until the input signal is processed.
[0063] In an embodiment of the present application, the amplitude to be adjusted is determined in the amplitude data, thereby reducing the number of amplitudes subjected to gain processing and reducing the operation amount of dynamic range control. In the embodiment of the present application, the parameter can also be determined by extracting the amplitude with the largest absolute value from the obtained continuous amplitudes as the amplitude to be adjusted. That is, the amplitude to be adjusted in the amplitude data is determined, including:
[0064] extracting a preset number of amplitudes obtained in sequence from the amplitude data as an amplitude group, and determining the amplitude with the largest absolute value in the amplitude group as the amplitude to be adjusted.
[0065] With reference to Figure 3 the flowchart of another dynamic range control method provided by the embodiment of the present application is shown, wherein the dynamic range control method includes:
[0066] S1, real-time amplitude detection is performed on the input signal to obtain amplitude data.
[0067] S2, a preset number of amplitudes obtained in sequence from the amplitude data are extracted as an amplitude group, and the amplitude with the largest absolute value in the amplitude group is determined as the amplitude to be adjusted.
[0068] S3, gain processing is performed on the amplitude to be adjusted to obtain a current adjustment gain.
[0069] S4, before obtaining the next adjustment gain, the input signal is adjusted and output by using the current adjustment gain.
[0070] It can be understood that, in the dynamic range control process, after receiving the input signal, the amplitude of the input signal is detected in real time to obtain amplitude data, when a certain number of continuous amplitudes are obtained as an amplitude group, the amplitude with the maximum absolute value in the amplitude group is determined as the amplitude to be adjusted; the gain of the amplitude to be adjusted is processed to obtain the current adjustment gain, and the input signal is adjusted and output by using the current adjustment gain. Thereafter, the amplitude of the input signal is still detected in real time, when a certain number of continuous amplitudes are obtained again after the last amplitude group, the certain number of newly obtained amplitudes are determined as a new amplitude group, and the amplitude with the maximum absolute value in the new amplitude group is determined as a new amplitude to be adjusted; the gain of the new amplitude to be adjusted is processed to obtain a new current adjustment gain, and the input signal is adjusted and output by using the current adjustment gain. The above steps are repeated until the input signal is processed.
[0071] In an embodiment of the present application, the gain of the amplitude to be adjusted is processed to obtain the current adjustment gain, including:
[0072] The current adjustment gain is calculated according to the amplitude to be adjusted, and the compression time or the release time is set based on the current adjustment gain.
[0073] It should be noted that, in the embodiment of the present application, the current adjustment gain is calculated according to the amplitude to be adjusted, specifically, one of the noise gate, the expander, the compressor and the limiter is selected according to the size of the amplitude to be adjusted to calculate the current adjustment gain.
[0074] It can be understood that, in the dynamic range control process, after the current adjustment gain is calculated according to the amplitude to be adjusted, the current adjustment gain cannot be directly applied to the input signal, so as to avoid the case that there is a large mutation between the two continuous adjustment gains obtained, and further avoid the mutation of the signal output by the dynamic range control method; therefore, the compression time or the release time is set based on the current adjustment gain, and is applied to the input signal after smoothing processing. The time length of the compression time and the release time provided in the embodiment of the present application is much greater than the time interval of the amplitude sampling points of the input signal.
[0075] Reference Figure 4 As shown in the figure, the dynamic range control device further provided by the present application includes:
[0076] The amplitude detection unit 100 is used for real-time amplitude detection of the input signal Vin to obtain amplitude data;
[0077] The determining unit 200 is configured to determine to-be-adjusted amplitude values in the amplitude data;
[0078] The gain obtaining unit 300 is configured to perform gain processing on the to-be-adjusted amplitude values to obtain a current adjustment gain Gain.
[0079] The processing unit 400 is configured to perform adjustment output on the input signal Vin by using the current adjustment gain Gain before obtaining a next adjustment gain.
[0080] It can be understood that the technical scheme provided by the present application only needs to perform gain processing on part of the to-be-adjusted amplitude values in the amplitude data, and the input signal is adjusted and output by using the current adjustment gain before obtaining the next adjustment gain, so that gain processing is not needed for all amplitudes in the amplitude data, and the amount of calculation in the dynamic range control process is reduced.
[0081] In an embodiment of the present application, the to-be-adjusted amplitude values are determined in the amplitude data, so that the number of amplitudes subjected to gain processing is reduced, and the amount of calculation in the dynamic range control is reduced. In the embodiment of the present application, the to-be-adjusted amplitude values can also be determined by extracting the amplitude with the largest absolute value from a certain number of continuous amplitudes. Figure 5 As shown in FIG. 4, another dynamic range control device provided by the embodiment of the present application is shown in the structure diagram, wherein the determining unit 200 provided by the embodiment of the present application comprises:
[0082] The counting module 210 is configured to count a plurality of amplitudes obtained from the amplitude data in sequence.
[0083] The first extracting module 220 is configured to extract the next amplitude after every preset number of amplitudes to determine the to-be-adjusted amplitude value; wherein the first extracting module obtains the statistical data of the counting module, and the first extracting module extracts the amplitude after obtaining the statistical data of the preset number of amplitudes.
[0084] It can be understood that, in the dynamic range control process, after receiving the input signal, the amplitude detection unit performs real-time amplitude detection on the input signal to obtain amplitude data, the counting module counts a plurality of amplitudes obtained from the amplitude data in sequence, and the first extraction module obtains the statistical data of the counting module, wherein when a certain number of amplitudes are counted by the counting module in sequence, the first extraction module determines that the next amplitude is the amplitude to be adjusted; the gain acquisition unit performs gain processing on the amplitude to be adjusted to obtain a current adjustment gain, and the processing unit adjusts and outputs the input signal by using the current adjustment gain. Thereafter, the input signal is still detected in real time, and when a certain number of amplitudes are obtained since the last amplitude to be adjusted, it is determined that the next amplitude obtained is the amplitude to be adjusted; the newly obtained amplitude to be adjusted is processed by gain to obtain a new current adjustment gain, and the input signal is adjusted and output by using the current adjustment gain. The above steps are repeated until the input signal is processed.
[0085] In an embodiment of the present application, the amplitude to be adjusted is determined in the amplitude data, thereby reducing the number of amplitudes subjected to gain processing and reducing the computational complexity of dynamic range control. In the embodiment of the present application, the amplitude to be adjusted can also be determined by extracting the amplitude with the largest absolute value from a certain number of consecutive amplitudes. Figure 6 As shown in FIG. 2, the determination unit 200 provided by the embodiment of the present application includes:
[0086] The acquisition module 230 is configured to extract a preset number of amplitudes obtained in sequence from the amplitude data as an amplitude group.
[0087] The second extraction module 240 is configured to extract the amplitude with the largest absolute value in the amplitude group as the amplitude to be adjusted.
[0088] It can be understood that, in the dynamic range control process, after receiving the input signal, the amplitude detection unit performs real-time amplitude detection on the input signal to obtain amplitude data, the counting module counts a plurality of amplitudes obtained from the amplitude data in sequence, and the first extraction module obtains the statistical data of the counting module, wherein when a certain number of amplitudes are counted by the counting module in sequence, the first extraction module determines that the next amplitude is the amplitude to be adjusted; the gain acquisition unit performs gain processing on the amplitude to be adjusted to obtain a current adjustment gain, and the processing unit adjusts and outputs the input signal by using the current adjustment gain. Thereafter, the input signal is still detected in real time, and when a certain number of amplitudes are obtained since the last amplitude to be adjusted, it is determined that the next amplitude obtained is the amplitude to be adjusted; the newly obtained amplitude to be adjusted is processed by gain to obtain a new current adjustment gain, and the input signal is adjusted and output by using the current adjustment gain. The above steps are repeated until the input signal is processed.
[0089] Reference Figure 4 As shown in the figure, the gain obtaining unit 300 provided by the embodiment of the present application comprises:
[0090] A gain generating module 310, configured to calculate the current adjustment gain according to the amplitude to be adjusted.
[0091] And a gain smoothing module 320, configured to set a compression time or a release time based on the current adjustment gain.
[0092] It should be noted that the gain generating module comprises a noise gate, an expander, a compressor and a limiter, wherein the gain generating module provided by the embodiment of the present application calculates the current adjustment gain according to the amplitude to be adjusted, specifically, selects one of the noise gate, the expander, the compressor and the limiter according to the size of the amplitude to be adjusted to calculate the current adjustment gain.
[0093] It can be understood that, in the dynamic range control process provided by the embodiment of the present application, after the current adjustment gain is calculated according to the amplitude to be adjusted, the current adjustment gain cannot directly act on the input signal, so as to avoid the case that there is a large mutation between the two continuous adjustment gains obtained, and further avoid the signal output by the dynamic range control method from having a mutation; therefore, it is necessary to set the compression time or the release time based on the current adjustment gain, and the input signal is acted on after being smoothed. The time length of the compression time and the release time provided by the embodiment of the present application is much greater than the time interval of the amplitude sampling points of the input signal.
[0094] Correspondingly, the present application also provides an electronic device, which comprises the dynamic range control device provided by any one of the above embodiments.
[0095] Reference Figure 7 As shown in the figure, it is a structural schematic diagram of an electronic device provided by the embodiment of the present application, wherein the electronic device provided by the embodiment of the present application can be a terminal product such as a smart phone or a sound box. The electronic device comprises the dynamic range control device 10 provided by any one of the above embodiments;
[0096] And a loudspeaker 20 connected with the dynamic range control device 10.
[0097] It should be noted that the electronic device provided by the embodiment of the present application can also be other types of devices, and the present application does not make specific limitation thereto.
[0098] The application provides a dynamic range control method and device and electronic equipment, comprising: performing real-time amplitude detection on an input signal to obtain amplitude data; determining to-be-adjusted amplitudes in the amplitude data; performing gain processing on the to-be-adjusted amplitudes to obtain a current adjustment gain; and before obtaining a next adjustment gain, adjusting and outputting the input signal by using the current adjustment gain. According to the above content, the technical solution provided by the application only needs to perform gain processing on part of the to-be-adjusted amplitudes in the amplitude data, and before obtaining the next adjustment gain, the input signal is adjusted and output by using the current adjustment gain, so that gain processing is not needed for all amplitudes in the amplitude data, and the operation amount in the dynamic range control process is reduced.
[0099] The above description of disclosed embodiments enables one of ordinary skill in the art to make or use the application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein can be applied to other embodiments without departing from the spirit or scope of the application. Thus, the present application is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A dynamic range control method, characterized by, The method comprises the following steps: real-time amplitude detection of an input signal to obtain amplitude data; determining an amplitude to be adjusted in the amplitude data; determining an amplitude to be adjusted in the amplitude data, comprising: in a plurality of amplitudes obtained in sequence from the amplitude data, determining a next amplitude after every preset number of amplitudes as the amplitude to be adjusted; or extracting a preset number of amplitudes obtained in sequence from the amplitude data as an amplitude group, and determining an amplitude with the largest absolute value in the amplitude group as the amplitude to be adjusted; dynamically calculating a current adjustment gain according to the amplitude to be adjusted; before obtaining a next adjustment gain, adjusting and outputting the input signal by using the current adjustment gain.
2. The dynamic range control method according to claim 1, characterized by, The method of real-time amplitude detection of an input signal to obtain amplitude data comprises the following steps: using a peak value detection method or a root mean square value detection method to perform real-time amplitude detection on the input signal to obtain the amplitude data.
3. The dynamic range control method of claim 1, wherein, The method of gain processing of the amplitude to be adjusted to obtain a current adjustment gain comprises the following steps: calculating the current adjustment gain according to the amplitude to be adjusted, and setting a compression time or a release time based on the current adjustment gain.
4. A dynamic range control apparatus characterized by comprising: The method comprises the following steps: an amplitude detection unit for performing real-time amplitude detection on an input signal to obtain amplitude data; a determination unit for determining an amplitude to be adjusted in the amplitude data; the determination unit comprises: a counting module for counting a plurality of amplitudes obtained in sequence from the amplitude data; and a first extraction module for extracting a next amplitude after every preset number of amplitudes as the amplitude to be adjusted; or the determination unit comprises: an acquisition module for extracting a preset number of amplitudes obtained in sequence from the amplitude data as an amplitude group; and a second extraction module for extracting an amplitude with the largest absolute value in the amplitude group as the amplitude to be adjusted; a gain acquisition unit for dynamically calculating a current adjustment gain according to the amplitude to be adjusted; and a processing unit for adjusting and outputting the input signal by using the current adjustment gain before obtaining a next adjustment gain.
5. The dynamic range control apparatus of claim 4, wherein The gain acquisition unit comprises: a gain generation module for calculating the current adjustment gain according to the amplitude to be adjusted; and a gain smoothing module for setting a compression time or a release time based on the current adjustment gain.
6. An electronic device, comprising: The electronic device comprises the dynamic range control device of any one of claims 4-5. The electronic device comprises the dynamic range control device of any one of claims 4-5.
Citation Information
Patent Citations
Gain control method and system for playing audio signal
CN101399523A