Method, apparatus, device and medium for realizing conversion of decibel value of audio to linear value
By constructing a conversion relationship between decibel values and linear values through a coordinate rotation digital calculation algorithm, the problems of accuracy and resource consumption in existing technologies are solved, achieving high-precision conversion of decibel values to linear values and reducing hardware resource consumption.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- ZHUHAI NANXIN SEMICON TECH CO LTD
- Filing Date
- 2026-02-28
- Publication Date
- 2026-06-09
Smart Images

Figure CN122173734A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of audio signal processing technology and related technical fields, specifically to a method, apparatus, device, and medium for converting decibel values of audio into linear values. Background Technology
[0002] Smart power amplifiers (Smart PAs) or coder-decoders (CODECs) in audio involve the process of converting decibel (dB) values into linear values. For example, in the audio compression process, decibel values are converted into linear values to achieve audio signal conversion.
[0003] In existing technologies, the process of converting decibel values to linear values generally employs lookup table methods and piecewise linear approximation methods. The lookup table method involves pre-storing the mapping relationship between decibel values and linear values in hardware memory, and directly retrieving the stored result using the input value as an address index during calculation. The piecewise linear approximation method divides the domain of the logarithmic function (e.g., the range of linear values) into several segments, and each segment is approximated by the linear function y=kx+b. The hardware determines the interval to which the input value belongs and calls the corresponding linear coefficients (k, b) to calculate the result. However, in the lookup table method, the accuracy of the converted linear value depends on the accuracy of the mapping relationship between the decibel value and the linear value. To ensure the accuracy of the converted linear value, the mapping relationship between the decibel value and the linear value is generally set to a high accuracy, resulting in significant resource consumption. In the piecewise linear approximation method, the required accuracy cannot be met.
[0004] Given the problems with existing technologies, there is an urgent need for a method to convert audio decibel values into linear values. Summary of the Invention
[0005] The embodiments described herein provide a method, apparatus, device, and medium for converting audio decibel values to linear values, which has the advantages of high accuracy and low resource consumption in the process of converting audio decibel values to linear values.
[0006] Firstly, according to the content of this disclosure, a method for converting decibel values of audio to linear values is provided, including: Based on the initial conversion relationship between decibel values and linear values, as well as the conversion relationship between commonly used exponential functions and natural exponential functions, determine the initial target conversion relationship between decibel values and linear values; Based on the standard range of decibel values for audio, the initial range of the exponent value of the exponential function of the initial target transformation relationship is determined. Then, based on the correspondence between the initial range and the preset range of the coordinate rotation digital calculation algorithm, the initial target transformation relationship is transformed to obtain the target transformation relationship. The linear value is determined based on the coordinate rotation digital calculation algorithm and the target transformation relationship.
[0007] In some embodiments of this disclosure, determining the initial target conversion relationship between decibel values and linear values based on the initial conversion relationship between decibel values and linear values, and the conversion relationship between commonly used exponential functions and natural exponential functions, includes: An initial conversion relationship between decibel values and linear values is established, wherein the initial conversion relationship is an exponential function based on a commonly used exponent; Obtain the conversion relationship between commonly used exponential functions and the natural exponential function; Based on the conversion relationship between the commonly used exponential function and the natural exponential function, the basis of the initial conversion relationship is transformed to obtain the initial target conversion relationship between the decibel value and the linear value.
[0008] In some embodiments of this disclosure, the step of determining the initial range of the exponent value of the exponential function of the initial target transformation relationship based on the standard range of decibel values of the audio, and transforming the initial target transformation relationship according to the correspondence between the initial range and the preset range of the coordinate rotation digital calculation algorithm to obtain the target transformation relationship includes: Based on the standard range of decibel values for audio, the standard range is substituted into the initial target conversion relationship to obtain the initial range of exponent values for the exponent function in the initial target conversion relationship. Based on the correspondence between the initial value range and the preset value range of the coordinate rotation digital calculation algorithm, the initial target transformation relationship is transformed through a shift operation to obtain the target transformation relationship, wherein the target value range of the exponent value of the exponential function in the target transformation relationship is less than 0.
[0009] In some embodiments of this disclosure, determining the linear value based on the coordinate rotation digital calculation algorithm and the target transformation relationship includes: The relationship between the input vector and the output vector is determined based on the coordinate rotation digital calculation algorithm described above. Construct the relationship between the exponent value and the input vector; The linear value is determined based on the relationship between the input vector and the output vector, and the relationship between the exponent value and the input vector.
[0010] In some embodiments of this disclosure, the input vector is ( , , The output vector is ( , , The relationship between the input vector and the output vector satisfies:
[0011]
[0012] The relationship between the exponent value and the input vector satisfies:
[0013]
[0014] in, This is the exponent value of the exponential function. , where m is the number of iterations in the coordinate rotation numerical calculation algorithm.
[0015] In some embodiments of this disclosure, determining the linear value based on the relationship between the input vector and the output vector, and the relationship between the exponent value and the input vector, includes: The exponent value of the exponential function in the target conversion relationship is determined based on the decibel value, and the exponent value is divided into a first exponent value and a second exponent value based on the exponent value of the exponential function in the target conversion relationship. Based on the relationship between the exponent value and the third sub-input vector, the relationship between the first sub-output vector and the input vector, and the relationship between the second sub-output vector and the input vector, determine the relationship between the first sub-output vector and the first exponent value, and the relationship between the second sub-output vector and the first exponent value. Based on the relationship between the first sub-output vector and the first exponent value, and the relationship between the second sub-output vector and the first exponent value, determine the first linear value of the target transformation relationship; Based on the second exponent value, determine the second linear value of the target transformation relationship; The linear value is determined based on the first linear value, the second linear value, and the shift phase number.
[0016] In some embodiments of this disclosure, determining the linear value based on the first linear value, the second linear value, and the shift phase number includes: Determine the initial linear value based on the first linear value and the second linear value; The initial linear value is shifted according to the shift phase number to obtain the linear value.
[0017] Secondly, according to the present disclosure, an apparatus for converting decibel values of audio to linear values is provided, comprising: The initial conversion relationship determination module is used to determine the initial target conversion relationship between decibel values and linear values based on the initial conversion relationship between decibel values and linear values, as well as the conversion relationship between commonly used exponential functions and natural exponential functions. The target conversion relationship determination module is used to determine the initial range of the exponent value of the exponent function of the initial target conversion relationship based on the standard range of the decibel value of the audio, and to convert the initial target conversion relationship according to the correspondence between the initial range and the preset range of the coordinate rotation digital calculation algorithm to obtain the target conversion relationship; The linear value determination module is used to determine the linear value based on the coordinate rotation digital calculation algorithm and the target transformation relationship.
[0018] Thirdly, according to this disclosure, a computer device is provided, comprising: One or more processors; Storage device for storing one or more programs. When the one or more programs are executed by the one or more processors, the one or more processors implement the method as described in any of the first aspects.
[0019] Fourthly, according to the present disclosure, a computer-readable storage medium is provided having a computer program stored thereon that, when executed by a processor, implements the methods described in any of the first aspects.
[0020] The method, apparatus, device, and medium for converting decibel values to linear values in audio provided in this disclosure first determine the initial target conversion relationship between decibel values and linear values based on the initial conversion relationship between decibel values and linear values, as well as the conversion relationship between commonly used exponential functions and natural exponential functions. Then, based on the standard range of decibel values for audio, the initial range of the exponential value of the exponential function of the initial target conversion relationship is determined. Furthermore, based on the correspondence between the initial range and the preset range of the coordinate rotation digital calculation algorithm, the initial target conversion relationship is converted to obtain the target conversion relationship. Finally, the linear value conversion process can be achieved through the coordinate rotation digital calculation algorithm, which provides high accuracy for the calculated linear value. In addition, the data processing method based on the coordinate rotation digital calculation algorithm can be directly implemented through hardware (digital circuits). The calculation process only requires one multiplier, resulting in low resource consumption, and ensures that the decibel value input to the coordinate rotation digital calculation algorithm satisfies the convergence region of the algorithm.
[0021] The above description is merely an overview of the technical solutions of the embodiments of this application. In order to better understand the technical means of the embodiments of this application and to implement them in accordance with the contents of the specification, and to make the above and other objects, features and advantages of the embodiments of this application more obvious and understandable, specific implementation methods of this application are described below. Attached Figure Description
[0022] To more clearly illustrate the technical solutions of the embodiments of this disclosure, the accompanying drawings of the embodiments will be briefly described below. It should be understood that the drawings described below only relate to some embodiments of this disclosure and are not intended to limit this disclosure, wherein: Figure 1 This is a flowchart illustrating a method for converting decibel values of audio to linear values according to an embodiment of this disclosure; Figure 2 This is a schematic diagram of a device for converting decibel values of audio to linear values according to an embodiment of this disclosure; Figure 3 This is a schematic diagram of the structure of a computer device provided in an embodiment of this disclosure.
[0023] In the accompanying diagram, markers with the same last two digits correspond to the same elements. It should be noted that the elements in the diagram are schematic and not drawn to scale. Detailed Implementation
[0024] To make the objectives, technical solutions, and advantages of the embodiments of this disclosure clearer, the technical solutions of the embodiments of this disclosure will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this disclosure. All other embodiments obtained by those skilled in the art based on the described embodiments of this disclosure without creative effort are also within the scope of protection of this disclosure.
[0025] Unless otherwise defined, all terms used herein (including technical and scientific terms) shall have the same meaning as commonly understood by one of ordinary skill in the art to which this subject matter pertains. It will be further understood that terms such as those defined in commonly used dictionaries shall be interpreted as having the meaning consistent with their meaning in the context of the specification and in the relevant art, and shall not be interpreted in an idealized or overly formal form unless otherwise explicitly defined herein. As used herein, the statement of “connecting” or “coupling” two or more parts together shall mean that these parts are directly joined together or joined through one or more intermediate components.
[0026] The term "embodiment" as used herein means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The appearance of the phrase "embodiment" in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.
[0027] In this article, the term "and / or" is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can mean: A exists, A and B exist simultaneously, or B exists. Additionally, the character " / " in this article generally indicates that the preceding and following related objects have an "or" relationship.
[0028] Furthermore, in all embodiments of this disclosure, terms such as “first” and “second” are used only to distinguish one component (or part of a component) from another component (or another part of a component).
[0029] In the description of this application, unless otherwise stated, "multiple" means two or more (including two), and similarly, "multiple groups" means two or more (including two groups).
[0030] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings.
[0031] In view of the problems existing in the prior art, this disclosure provides a method for converting decibel values of audio to linear values. Figure 1 This is a flowchart illustrating a method for converting decibel values of audio to linear values, as provided in an embodiment of this disclosure. Figure 1 As shown, methods for converting audio decibel values to linear values include: S110. Based on the initial conversion relationship between decibel values and linear values, and the conversion relationship between commonly used exponential functions and natural exponential functions, determine the initial target conversion relationship between decibel values and linear values.
[0032] In a specific implementation, the initial target conversion relationship between decibel values and linear values is determined based on the initial conversion relationship between decibel values and linear values, as well as the conversion relationship between commonly used exponential functions and natural exponential functions. This includes: constructing the initial conversion relationship between decibel values and linear values, wherein the initial conversion relationship is an exponential function based on commonly used exponential functions; obtaining the conversion relationship between commonly used exponential functions and natural exponential functions; and transforming the basis of the initial conversion relationship based on the conversion relationship between commonly used exponential functions and natural exponential functions to obtain the initial target conversion relationship between decibel values and linear values.
[0033] Specifically, the initial conversion relationship between the decibel value and the linear value of audio satisfies: (1) in, This refers to the decibel value of the audio signal. The decibel value is The linear value corresponding to the audio.
[0034] The method for converting audio decibel values to linear values provided in this disclosure employs a coordinate rotation digital calculation algorithm to convert audio decibel values into linear values. The coordinate rotation digital calculation algorithm can process functions including natural exponential functions with the natural exponent e as the base, i.e. The function, to ensure that the coordinate rotation digital calculation algorithm correctly converts the decibel value of the audio into a linear value, transforms the basis in the initial conversion relationship between the decibel value and the linear value according to the conversion relationship between the commonly used exponential function and the natural exponential function, so as to obtain the initial target conversion relationship between the decibel value and the linear value with the natural exponential e as the basis, that is, to obtain the initial target conversion relationship between the decibel value and the linear value with the natural exponential e as the basis.
[0035] Specifically, the conversion relationship between commonly used exponential functions and natural exponential functions satisfies: (2) Based on the conversion coefficients between commonly used exponential functions and natural exponential functions, as well as the initial conversion relationship between decibel values and linear values, the initial target conversion relationship between audio decibel values and linear values can be determined to satisfy: (3) S120. Based on the standard range of decibel values for audio, determine the initial range of the exponent value of the exponential function of the initial target conversion relationship, and based on the correspondence between the initial range and the preset range of the coordinate rotation digital calculation algorithm, convert the initial target conversion relationship to obtain the target conversion relationship.
[0036] In the specific implementation, based on the standard range of decibel values for audio, the initial range of the exponent value of the exponential function in the initial target conversion relationship is determined. Then, based on the correspondence between the initial range and the preset range of the coordinate rotation digital calculation algorithm, the initial target conversion relationship is transformed to obtain the target conversion relationship. This includes: substituting the standard range of decibel values for audio into the initial target conversion relationship to obtain the initial range of the exponent value of the exponential function in the initial target conversion relationship; and transforming the initial target conversion relationship through a shift operation based on the correspondence between the initial range and the preset range of the coordinate rotation digital calculation algorithm to obtain the target conversion relationship, wherein the target range of the exponent value of the exponential function in the target conversion relationship is less than 0.
[0037] The standard range of decibel values that need to be processed in general audio audio should meet the following requirements: Based on the standard range of decibel values to be processed in the audio, the initial range of the exponent value of the exponential function in the initial target transformation relationship can be determined to satisfy: .
[0038] However, the method for converting decibel values to linear values in audio provided in this embodiment requires determining the linear value corresponding to the input decibel value based on a coordinate rotation digital calculation algorithm. This coordinate rotation digital calculation algorithm struggles with natural exponential functions based on the natural exponent e. During the process, the natural exponential function The domain of the exponent value x must satisfy: The exponential function and the natural exponential function are often used to transform the initial conversion relationship between decibel values and linear values into an initial target conversion relationship with e as the base. The initial range of the exponential value of the exponential function in the initial target conversion relationship satisfies the following: In other words, the initial range of the exponent value of the exponential function in the initial target transformation relation exceeds the domain of the natural exponential function. Therefore, it is necessary to transform the initial target transformation relation to obtain the target transformation relation.
[0039] Specifically, based on the correspondence between the initial value range and the preset value range of the coordinate rotation digital calculation algorithm, the initial target transformation relationship is transformed through a shift operation to obtain the target transformation relationship.
[0040] It is understandable that the initial range of the exponent value of the exponential function in the initial target transformation relation satisfies: The natural exponential function The domain of the exponent value x must satisfy: To ensure that the initial range of the exponent value of the exponential function in the initial target transformation relation satisfies the natural exponential function... The domain of the exponent value x can be specifically implemented by transforming the domain of the exponent value of the natural exponential function in the initial target transformation relation to below 0. This is combined with functions that can be processed by coordinate rotation numerical calculation algorithms, and a shift operation is used to transform the domain of the exponent value of the natural exponential function in the initial target transformation relation to below 0. The specific implementation logic is as follows: Given... =5 =3.4655. By performing a shift operation on the initial target transformation relation, the domain of the exponent value of the natural exponential function in the initial target transformation relation is transformed to below 0. After the shift operation, the target transformation relation is obtained that satisfies: (4) That is, the exponential value of the natural exponential function in the initial target transformation relation. Then add Then, the initial target transformation relation is formally transformed to obtain... At this point, the target range of the exponent value of the exponent function of the target transformation relationship satisfies: This aims to change the range of the exponent value of the exponent function of the target transformation relationship to less than 0.
[0041] It should be noted that in the above implementation process, when changing the range of the exponent value of the initial target transformation relationship, it is necessary to multiply the initial target transformation relationship by 32. Multiplying by 32 can be achieved by left shifting by 5 bytes in the hardware implementation, without the need for additional multiplication operations.
[0042] S130. Determine the linear value based on the coordinate rotation digital calculation algorithm and the target transformation relationship.
[0043] In a specific implementation, the linear value is determined based on the coordinate rotation digital calculation algorithm and the target transformation relationship, including: determining the relationship between the input vector and the output vector based on the coordinate rotation digital calculation algorithm; constructing the relationship between the exponent value and the input vector; and determining the linear value based on the relationship between the input vector and the output vector and the relationship between the exponent value and the input vector.
[0044] For coordinate rotation numerical computation algorithms, after a sufficient number of iterations, the relationship between the input vector and the output vector satisfies:
[0045] (5)
[0046] Wherein, the input vector is ( , , The output vector is ( , , ).
[0047] To satisfy the functions that the coordinate rotation digital calculation algorithm can process, the target transformation relationship between the decibel value and the linear value of audio is a natural exponential function. To calculate the natural exponential function value in the target transformation relationship between the decibel value and the linear value of audio, the relationship between the constructed exponential value and the input vector must satisfy:
[0048] (6)
[0049] in, This is the exponent value of the natural exponential function. , where m is the number of iterations in the coordinate rotation numerical calculation algorithm.
[0050] After establishing the relationship between the exponent value and the input vector, substituting the expression for the relationship between the exponent value and the input vector into the expression for the relationship between the input vector and the output vector, we can obtain: (7) (8) At this point, by using the first sub-output vector Second sub-output vector Adding them together gives us: (9) In other words, it can be understood that in the target conversion relationship between decibel values and linear values, as long as the domain of the exponent value of the natural exponential function satisfies... Given the given conditions, the linear value corresponding to the decibel value can be determined based on the coordinate rotation digital calculation algorithm.
[0051] However, based on the analysis in step S120, it can be seen that the exponential value of the exponential function of the target transformation relationship is... The target value range satisfies: .
[0052] At this point, the necessary processing is to first substitute the decibel value to be converted into the exponential function of the target conversion relationship. This will determine the exponential value of the exponential function, which is a value less than 0 containing both an integer and a decimal part. By dividing the exponential value of the exponential function in the target conversion relationship into a first exponential value and a second exponential value, we define: (10) (11) Where q is the first exponent value (i.e., the fractional part of the exponent value) and p is the second exponent value (i.e., the integer part of the exponent value).
[0053] At this point, the target transformation relationship satisfies: (12) The range of the first exponent value satisfies the domain of the natural exponential function. Therefore, using the first exponent value q as the third sub-input vector, the input vector of the coordinate rotation numerical calculation algorithm then satisfies:
[0054] (13)
[0055] The first and second sub-output vectors of the coordinate rotation digital computation algorithm satisfy the following: (14) (15) By rotating the coordinates of the first sub-output vector of the digital computation algorithm Second sub-output vector Adding them together gives us: (16) Combination = It is understandable that the target transformation relationship can be calculated using a coordinate rotation numerical calculation algorithm. .
[0056] also, It can be multiplied by the second exponent p times. It is obtained through iteration.
[0057] Specifically, It is a constant, therefore, It can be confirmed directly.
[0058] In other words, it can be understood that in the target transformation relationship calculated through coordinate rotation digital calculation algorithms... After the value, by The value and Multiply them to obtain the initial linear value.
[0059] Finally, the number of shift phases is determined based on the coefficients multiplied by the target transformation relationship, and the initial linear value is shifted according to the number of shift phases to obtain the linear value. For example, combined with formula (12), the number of shift phases is shifted left by 5 bits.
[0060] That is, in the above implementation process, firstly, the exponent value of the target transformation relationship is determined based on the relationship between the input vector and the output vector, and the relationship between the exponent value and the input vector. This includes: firstly, determining the exponent value of the exponential function in the target transformation relationship based on the decibel value, and then dividing the exponent value into a first exponent value and a second exponent value based on the exponent value of the exponent function in the target transformation relationship; then, determining the relationship between the first sub-output vector and the first exponent value, and the relationship between the second sub-output vector and the first exponent value, based on the relationship between the exponent value and the third sub-input vector, the relationship between the first sub-output vector and the input vector, and the relationship between the second sub-output vector and the input vector; further, determining the first linear value of the target transformation relationship based on the relationship between the first sub-output vector and the first exponent value, and the relationship between the second sub-output vector and the first exponent value; then, determining the second linear value of the target transformation relationship based on the second exponent value; finally, determining the linear value based on the first linear value, the second linear value, and the shift phase number.
[0061] The process of determining the linear value based on the first linear value, the second linear value, and the number of shift phases includes: determining the initial linear value based on the first linear value and the second linear value; and shifting the initial linear value according to the number of shift phases to obtain the linear value.
[0062] It should be noted that in the above implementation process, the calculation of the first linear value and the second linear value can be performed simultaneously.
[0063] The method for converting decibel values to linear values in audio provided in this embodiment first determines the initial target conversion relationship between decibel values and linear values based on the initial conversion relationship between decibel values and linear values, as well as the conversion relationship between commonly used exponential functions and natural exponential functions. Then, based on the standard range of decibel values in audio, the initial range of the exponential value of the exponential function of the initial target conversion relationship is determined. The initial target conversion relationship is then converted according to the correspondence between the initial range and the preset range of the coordinate rotation digital calculation algorithm to obtain the target conversion relationship. Finally, the linear value conversion process can be achieved through the coordinate rotation digital calculation algorithm, which provides high accuracy for the calculated linear value. Furthermore, the data processing method based on the coordinate rotation digital calculation algorithm can be directly implemented through hardware (digital circuits). The calculation process only requires one multiplier, resulting in low resource consumption, and ensures that the decibel value input to the coordinate rotation digital calculation algorithm satisfies the convergence region of the algorithm.
[0064] Based on the above embodiments, this disclosure also provides an apparatus for converting audio decibel values to linear values. Figure 2 This is a schematic diagram of a device for converting decibel values of audio to linear values, as provided in an embodiment of this disclosure. Figure 2 As shown, the device for converting audio decibel values to linear values includes: The initial conversion relationship determination module 210 is used to determine the initial target conversion relationship between decibel values and linear values based on the initial conversion relationship between decibel values and linear values, as well as the conversion relationship between commonly used exponential functions and natural exponential functions; The target conversion relationship determination module 220 is used to determine the initial range of the exponent value of the exponent function of the initial target conversion relationship based on the standard range of the decibel value of the audio, and to convert the initial target conversion relationship according to the correspondence between the initial range and the preset range of the coordinate rotation digital calculation algorithm to obtain the target conversion relationship; The linear value determination module 230 is used to determine the linear value based on the coordinate rotation digital calculation algorithm and the target transformation relationship.
[0065] The apparatus for converting decibel values to linear values in audio provided in this embodiment first determines the initial target conversion relationship between decibel values and linear values based on the initial conversion relationship between decibel values and linear values, as well as the conversion relationship between commonly used exponential functions and natural exponential functions. Then, based on the standard range of decibel values in audio, it determines the initial range of the exponential value of the exponential function of the initial target conversion relationship. Based on the correspondence between the initial range and the preset range of the coordinate rotation digital calculation algorithm, the initial target conversion relationship is converted to obtain the target conversion relationship. Finally, the linear value conversion process can be achieved through the coordinate rotation digital calculation algorithm, which provides high accuracy for the calculated linear value. Furthermore, the data processing method based on the coordinate rotation digital calculation algorithm can be directly implemented through hardware (digital circuits). The calculation process only requires one multiplier, resulting in low resource consumption, and ensures that the decibel value input to the coordinate rotation digital calculation algorithm satisfies the convergence region of the algorithm.
[0066] In some embodiments of this disclosure, determining the initial target conversion relationship between decibel values and linear values based on the initial conversion relationship between decibel values and linear values, and the conversion relationship between commonly used exponential functions and natural exponential functions, includes: An initial conversion relationship between decibel values and linear values is established, wherein the initial conversion relationship is an exponential function based on a commonly used exponent; Obtain the conversion relationship between commonly used exponential functions and the natural exponential function; Based on the conversion relationship between the commonly used exponential function and the natural exponential function, the basis of the initial conversion relationship is transformed to obtain the initial target conversion relationship between the decibel value and the linear value.
[0067] In some embodiments of this disclosure, the step of determining the initial range of the exponent value of the exponential function of the initial target transformation relationship based on the standard range of decibel values of the audio, and transforming the initial target transformation relationship according to the correspondence between the initial range and the preset range of the coordinate rotation digital calculation algorithm to obtain the target transformation relationship includes: Based on the standard range of decibel values for audio, the standard range is substituted into the initial target conversion relationship to obtain the initial range of exponent values for the exponent function in the initial target conversion relationship. Based on the correspondence between the initial value range and the preset value range of the coordinate rotation digital calculation algorithm, the initial target transformation relationship is transformed through a shift operation to obtain the target transformation relationship, wherein the target value range of the exponent value of the exponential function in the target transformation relationship is less than 0.
[0068] In some embodiments of this disclosure, determining the linear value based on the coordinate rotation digital calculation algorithm and the target transformation relationship includes: The relationship between the input vector and the output vector is determined based on the coordinate rotation digital calculation algorithm; Construct the relationship between the exponent value and the input vector; The linear value is determined based on the relationship between the input vector and the output vector, as well as the relationship between the exponent and the input vector.
[0069] In some embodiments of this disclosure, the input vector is ( , , The output vector is ( , , The relationship between the input vector and the output vector satisfies:
[0070]
[0071] The relationship between the exponent value and the input vector satisfies:
[0072]
[0073] in, This is the exponent value of the exponential function. , where m is the number of iterations in the coordinate rotation numerical calculation algorithm.
[0074] In some embodiments of this disclosure, determining the linear value based on the relationship between the input vector and the output vector, and the relationship between the exponent value and the input vector, includes: The exponent value of the exponential function in the target conversion relationship is determined based on the decibel value, and the exponent value is divided into a first exponent value and a second exponent value based on the exponent value of the exponential function in the target conversion relationship. Based on the relationship between the exponent value and the third sub-input vector, the relationship between the first sub-output vector and the input vector, and the relationship between the second sub-output vector and the input vector, determine the relationship between the first sub-output vector and the first exponent value, and the relationship between the second sub-output vector and the first exponent value. Based on the relationship between the first sub-output vector and the first exponent value, and the relationship between the second sub-output vector and the first exponent value, determine the first linear value of the target transformation relationship; Based on the second exponent value, determine the second linear value of the target transformation relationship; The linear value is determined based on the first linear value, the second linear value, and the number of shifted phases.
[0075] In some embodiments of this disclosure, determining the linear value based on the first linear value, the second linear value, and the shift phase number includes: Determine the initial linear value based on the first linear value and the second linear value; The initial linear value is shifted according to the shift phase number to obtain the linear value.
[0076] This application also provides a computer device, please refer to 3 for details. Figure 3 This is a basic structural block diagram of the computer device in this embodiment.
[0077] The computer device includes a memory 510 and a processor 520 that are interconnected via a system bus. It should be noted that only a computer device with components 510-520 is shown in the figure; however, it should be understood that it is not required to implement all the shown components, and more or fewer components may be implemented alternatively. Those skilled in the art will understand that the computer device described herein is a device capable of automatically performing numerical calculations and / or information processing according to pre-set or stored instructions, and its hardware includes, but is not limited to, microprocessors, application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), digital signal processors (DSPs), embedded devices, etc.
[0078] Computer devices can include desktop computers, laptops, handheld computers, and cloud servers. These devices allow for human-computer interaction with users through keyboards, mice, remote controls, touchpads, or voice-activated devices.
[0079] The memory 510 includes at least one type of readable storage medium, including non-volatile memory or volatile memory, such as flash memory, hard disk, multimedia card, card-type memory (e.g., SD or DX memory), random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, magnetic disk, optical disk, etc. RAM may include static RAM or dynamic RAM. In some embodiments, the memory 510 may be an internal storage unit of a computer device, such as the hard disk or memory of the computer device. In other embodiments, the memory 510 may also be an external storage device of the computer device, such as a plug-in hard disk, smart media card (SMC), secure digital (SD) card, or flash card equipped on the computer device. Of course, the memory 510 may include both internal storage units and external storage devices of the computer device. In this embodiment, the memory 510 is typically used to store the operating system and various application software installed on the computer device, such as the program code of the method described above. In addition, the memory 510 may also be used to temporarily store various types of data that have been output or will be output.
[0080] The processor 520 is typically used to perform the overall operation of a computer device. In this embodiment, the memory 510 is used to store program code or instructions, including computer operation instructions. The processor 520 is used to execute the program code or instructions stored in the memory 510 or to process data, such as program code that runs the methods described above.
[0081] In this article, the bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. This bus system can be divided into address bus, data bus, control bus, etc. For ease of illustration, only one thick line is used to represent it in the diagram, but this does not mean that there is only one bus or one type of bus.
[0082] Another embodiment of this application also provides a computer-readable medium, which may be a computer-readable signal medium or a computer-readable medium. A processor in a computer reads computer-readable program code stored in the computer-readable medium, enabling the processor to execute the functional actions specified in each step or combination of steps in the above method; and to generate means for implementing the functional actions specified in each block or combination of blocks in the block diagram.
[0083] Computer-readable media include, but are not limited to, electronic, magnetic, optical, electromagnetic, infrared memory or semiconductor systems, devices or apparatuses, or any suitable combination thereof, wherein the memory is used to store program code or instructions, the program code including computer operation instructions, and the processor is used to execute the program code or instructions of the above-described methods stored in the memory.
[0084] The definitions of memory and processor can be found in the description of the foregoing computer device embodiments, and will not be repeated here.
[0085] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.
[0086] In the various embodiments of this application, the functional units or modules can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0087] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) or processor to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0088] Unless otherwise expressly indicated by the context, the singular form of words used herein and in the appended claims includes the plural form, and vice versa. Thus, when referring to the singular, the plural form of the corresponding term is generally included. Similarly, the terms “comprising” and “including” shall be interpreted as including rather than exclusively. Likewise, the terms “including” and “or” shall be interpreted as including unless such interpretation is expressly prohibited herein. Where the term “example” is used herein, particularly when it follows a set of terms, the “example” is merely exemplary and illustrative and should not be considered exclusive or extensive.
[0089] Further aspects and scope of adaptation become apparent from the description provided herein. It should be understood that various aspects of this application may be implemented individually or in combination with one or more other aspects. It should also be understood that the descriptions and specific embodiments herein are for illustrative purposes only and are not intended to limit the scope of this application.
[0090] Several embodiments of this disclosure have been described in detail above. However, it is obvious that those skilled in the art can make various modifications and variations to the embodiments of this disclosure without departing from the spirit and scope of this disclosure. The scope of protection of this disclosure is defined by the appended claims.
Claims
1. A method for converting decibel values of audio to linear values, characterized in that, include: Based on the initial conversion relationship between decibel values and linear values, as well as the conversion relationship between commonly used exponential functions and natural exponential functions, determine the initial target conversion relationship between decibel values and linear values; Based on the standard range of decibel values for audio, the initial range of the exponent value of the exponential function of the initial target transformation relationship is determined. Then, based on the correspondence between the initial range and the preset range of the coordinate rotation digital calculation algorithm, the initial target transformation relationship is transformed to obtain the target transformation relationship. The linear value is determined based on the coordinate rotation digital calculation algorithm and the target transformation relationship.
2. The method according to claim 1, characterized in that, The process of determining the initial target conversion relationship between decibel values and linear values based on the initial conversion relationship between decibel values and linear values, as well as the conversion relationship between commonly used exponential functions and natural exponential functions, includes: An initial conversion relationship between decibel values and linear values is established, wherein the initial conversion relationship is an exponential function based on a commonly used exponent; Obtain the conversion relationship between commonly used exponential functions and the natural exponential function; Based on the conversion relationship between the commonly used exponential function and the natural exponential function, the basis of the initial conversion relationship is transformed to obtain the initial target conversion relationship between the decibel value and the linear value.
3. The method according to claim 1, characterized in that, The process involves determining the initial range of the exponent value of the exponential function of the initial target transformation relationship based on the standard range of decibel values for audio, and then transforming the initial target transformation relationship according to the correspondence between the initial range and the preset range of the coordinate rotation digital calculation algorithm to obtain the target transformation relationship, including: Based on the standard range of decibel values for audio, the standard range is substituted into the initial target conversion relationship to obtain the initial range of exponent values for the exponent function in the initial target conversion relationship. Based on the correspondence between the initial value range and the preset value range of the coordinate rotation digital calculation algorithm, the initial target transformation relationship is transformed through a shift operation to obtain the target transformation relationship, wherein the target value range of the exponent value of the exponential function in the target transformation relationship is less than 0.
4. The method according to claim 1, characterized in that, The step of determining the linear value based on the coordinate rotation digital calculation algorithm and the target transformation relationship includes: The relationship between the input vector and the output vector is determined based on the coordinate rotation digital calculation algorithm described above. Construct the relationship between the exponent value and the input vector; The linear value is determined based on the relationship between the input vector and the output vector, and the relationship between the exponent value and the input vector.
5. The method according to claim 4, characterized in that, The input vector is ( , , The output vector is ( , , The relationship between the input vector and the output vector satisfies: The relationship between the exponent value and the input vector satisfies: in, This is the exponent value of the exponential function. , where m is the number of iterations in the coordinate rotation numerical calculation algorithm.
6. The method according to claim 5, characterized in that, The step of determining the linear value based on the relationship between the input vector and the output vector, and the relationship between the exponent value and the input vector, includes: The exponent value of the exponential function in the target conversion relationship is determined based on the decibel value, and the exponent value is divided into a first exponent value and a second exponent value based on the exponent value of the exponential function in the target conversion relationship. Based on the relationship between the exponent value and the third sub-input vector, the relationship between the first sub-output vector and the input vector, and the relationship between the second sub-output vector and the input vector, determine the relationship between the first sub-output vector and the first exponent value, and the relationship between the second sub-output vector and the first exponent value. Based on the relationship between the first sub-output vector and the first exponent value, and the relationship between the second sub-output vector and the first exponent value, determine the first linear value of the target transformation relationship; Based on the second exponent value, determine the second linear value of the target transformation relationship; The linear value is determined based on the first linear value, the second linear value, and the number of shifted phases.
7. The method according to claim 6, characterized in that, The step of determining the linear value based on the first linear value, the second linear value, and the shift phase number includes: Determine the initial linear value based on the first linear value and the second linear value; The initial linear value is shifted according to the shift phase number to obtain the linear value.
8. A device for converting decibel values of audio to linear values, characterized in that, include: The initial conversion relationship determination module is used to determine the initial target conversion relationship between decibel values and linear values based on the initial conversion relationship between decibel values and linear values, as well as the conversion relationship between commonly used exponential functions and natural exponential functions. The target conversion relationship determination module is used to determine the initial range of the exponent value of the exponent function of the initial target conversion relationship based on the standard range of the decibel value of the audio, and to convert the initial target conversion relationship according to the correspondence between the initial range and the preset range of the coordinate rotation digital calculation algorithm to obtain the target conversion relationship; The linear value determination module is used to determine the linear value based on the coordinate rotation digital calculation algorithm and the target transformation relationship.
9. A computer device, characterized in that, include: One or more processors; Storage device for storing one or more programs. When the one or more programs are executed by the one or more processors, the one or more processors implement the method as described in any one of claims 1 to 7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the method as described in any one of claims 1 to 7.