Digital information data encoding method
Through the method of combining adaptive bit length coding and entropy coding, the bit length of audio data is predicted, which solves the problem of difficulty in balancing the compression rate and distortion of audio data in the existing technology, and achieves more efficient audio data coding and better Playback quality.
Patent Information
- Application Number
- CN202110179181.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-02-09
- Publication Date
- 2024-10-18
- Estimated Expiration
- 2041-02-09
AI Technical Summary
While existing digital audio data encoding technology improves the compression rate, it is difficult to balance the degree of distortion of the audio data, and when the gain value is too large, it will cause serious distortion of the audio data and affect the playback quality.
The adaptive bit length coding method is used to predict the bit length of the quantized audio data. By combining adaptive bit length coding and entropy coding, the amount of compression operations is reduced, and the correlation of values between frequencies is used to predict the bit length to reduce error, achieving higher compression ratios.
The compression rate of audio data is improved, while the distortion level of audio data is reduced, and the efficiency of audio encoding and playback quality are improved.
Smart Images

Figure CN114913863B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to information data, and in particular to a method for encoding digital information data. Background Art
[0002] Digital audio data is usually compressed frame by frame and transmitted to the receiving end via a wired or wireless network for decompression and playback. Lossy compression is generally used to remove subtle differences in sound that are indistinguishable to the human ear in order to improve compression efficiency.
[0003] like Figure 1 Steps 801 to 807 of a typical audio data encoding process are shown. The original audio data PCM first undergoes a time domain to frequency domain transform (Time Domain to Frequency Domain Transform) to concentrate the energy of the sound signal to the medium and low frequencies. Modified Discrete Cosine Transform (MDCT) is a transform used in commonly used audio compression formats such as AAC and MP3. The output of the transform is evaluated by a psychoacoustic model (Psychoacoustic Model), some masked frequencies are removed, and then quantized to reduce the output value. Then entropy encoding (entropy encoding) such as Huffman coding (Huffman coding) or arithmetic coding (Arithmetic coding) is used for lossless compression (lossless compression), and finally packaged into a frame of data for output.
[0004] like Figure 2 Steps 809 to 813 of the decoding process of compressed audio data are shown. The compressed data is first decompressed losslessly to obtain a quantized value, then multiplied by a gain value to obtain an output close to the original MDCT, and finally an inverse MDCT is performed to obtain the original audio data close to that before encoding.
[0005] Quantization is mainly to divide the MDCT output value by the gain value (Gain) and take the integer result. Figure 3 As shown in the figure, it can be observed that the larger values are mainly concentrated in the low frequency and the medium frequency, which is the effect of the MDCT transform. After quantization, the output value of the MDCT is greatly reduced, and many high-frequency parts are close to 0, which is beneficial to the compression rate of the subsequent entropy coding. It is worth noting that if the gain value is larger, the quantized value is smaller, and the compressed data length is also smaller, but the larger the gain value, the higher the degree of distortion of the relative signal data. Therefore, how to obtain a better compression rate with the same gain is an important issue for the signal encoder. Summary of the invention
[0006] The present application provides a digital information data encoding method in view of the deficiencies of the prior art, comprising the following steps: (a) performing an improved discrete cosine transform on the original information data to transform the waveform of the information signal of the original information data from the time domain to the frequency domain to form a converted information data; (b) extracting an integer value by dividing the converted information data by the gain value to quantize the converted information data to form quantized information data; (c) storing the positive and negative signs of multiple initial quantized values of all frequencies in the quantized information data; (d) taking the absolute value of each initial quantized value in the quantized information data to respectively form multiple quantized values; (e) The method further comprises the steps of: (a) using a previous quantized value among a plurality of quantized values in the quantized information data to predict the bit length of the current quantized value to generate a bit length prediction value, until the bit lengths of all the plurality of quantized values are predicted in sequence from high frequency to low frequency; and (f) directly storing the portion of the bits whose bit length of the current quantized value is less than or equal to the bit length prediction value as a remainder without encoding, and storing the portion of the bits whose bit length is greater than the bit length prediction value as a quotient which is subsequently encoded. If the bit length of the current quantized value is less than or equal to the bit length prediction value, the quotient is 0, and repeatedly performing step (f) until all the plurality of quantized values in the quantized information data are processed.
[0007] In one embodiment, the digital audio data encoding method further comprises the following steps: (g) performing a first encoding on all quotients: determining whether the quotient is less than 2, if so, the encoding character is the quotient, if not, the encoding character is 2; (h) performing a second encoding on quotients greater than or equal to 2: determining whether the quotient is greater than 3, if not, adding 0 to 3 characters "1" to the encoding string based on the quotient value, and finally adding the character "0" to indicate that the quotient encoding is completed, and no subsequent steps are performed; if so, performing subsequent steps (i) to (l); (i) adding the character "2" to the encoding string; (j) adding the lowest two bits of the quotient value to the encoding string in sequence; (k) shifting the quotient value to the right by two bits; (l) determining whether the quotient value is greater than 3, if so, performing steps (i) to (k) again, if not, adding 0 to 3 characters "1" to the encoding string based on the quotient value, and finally adding the character "0" to indicate that the quotient encoding is completed.
[0008] In one embodiment, the digital audio data encoding method further comprises the following steps: sequentially obtaining the bit lengths of a plurality of quantized values sorted from low frequency to high frequency; and sorting the bit lengths of the plurality of quantized values from high frequency to low frequency.
[0009] In one embodiment, the digital audio data encoding method further includes the following steps: predicting the bit length of the current quantization value based on the bit length of the previous quantization value and the bit length prediction value of the previous quantization value, as represented by the following equation: P[n]=P[n-1]*a+B[n-1]*(1-a), wherein P[n] represents the bit length prediction value of the current quantization value, P[n-1] represents the bit length prediction value of the previous quantization value, B[n-1] represents the bit length of the previous quantization value, and a represents a coefficient ranging from 0 to 1.
[0010] In one embodiment, the digital audio data encoding method further comprises the following steps: packaging all directly stored remainders and the compressed final encoded string into an audio bit stream and transmitting it to the audio playback end; disassembling the audio bit stream and decompressing the compressed data of the final encoded string to obtain all encoded strings; decoding all encoded strings to obtain all quotients; calculating the bit length prediction value of the current quantized value from the bit length prediction value of the previous quantized value and the bit length of the previous quantized value, and extracting the remainder from the audio bit stream according to the predicted bit length; combining the quotient and the remainder to restore the current quantized value; calculating the bit length of the current quantized value, and then calculating the bit length prediction value of the next quantized value with the predicted bit length of the current quantized value; and iterating all quantized values in this way, adding the stored positive and negative signs to restore all initial quantized values of the original audio data.
[0011] As described above, the present application provides a digital audio data encoding method and method, which has the following characteristics:
[0012] The quantized value is first subjected to adaptive bit length encoding and then entropy encoding to improve the compression rate;
[0013] Adaptive bit length coding predicts the bit length of the next value based on past values. Bits above the predicted bit length are encoded, and bits below the predicted bit length are directly stored without compression, reducing the amount of compression operations.
[0014] The correlation between the frequency values is used to reduce the error between the predicted value bit length and the actual bit length.
[0015] To further understand the features and technical contents of the present application, please refer to the following detailed description and drawings of the present application. However, the drawings provided are only for reference and illustration and are not intended to limit the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] Figure 1 This is a flow chart for encoding message data.
[0017] Figure 2 This is a decoding flow chart for compressed data of a message.
[0018] Figure 3 It is a curve graph of MDCT output and quantized value.
[0019] Figure 4 Flow chart of the steps of encoding quantized values in the digital audio data encoding method according to an embodiment of the present application.
[0020] Figure 5 1 is a flowchart of the steps of predicting the bit length of the current quantized value according to the bit length of the previous quantized value and the bit length prediction value of the digital audio data encoding method according to the embodiment of the present application.
[0021] Figure 6 Flow chart of the encoding steps of the digital audio data encoding method according to an embodiment of the present application.
[0022] Figure 7 Schematic diagram of the bit length of the quantized value of the original audio signal sorted from low to high frequency in the digital audio data encoding method according to an embodiment of the present application.
[0023] Figure 8 Schematic diagram of the bit length of the quantized value and the predicted bit length of the original audio signal sorted from high to low frequency in the digital audio data encoding method according to an embodiment of the present application. DETAILED DESCRIPTION
[0024] The following is an explanation of the implementation methods of the present application through specific specific embodiments. Those skilled in the art can understand the advantages and effects of the present application from the contents disclosed in this specification. The present application can be implemented or applied through other different specific embodiments, and the details in this specification can also be modified and changed in various ways based on different viewpoints and applications without departing from the concept of the present application. In addition, the drawings of the present application are only simple schematic illustrations and are not depicted according to actual dimensions. It is stated in advance. The following implementation methods will further explain the relevant technical contents of the present application in detail, but the disclosed contents are not intended to limit the scope of protection of the present application. In addition, the term "or" used herein may include any one or more combinations of the associated listed items depending on the actual situation.
[0025] See also Figure 4 , Figure 7 and Figure 8 ,in Figure 4 A flowchart of the steps of encoding quantized values in the digital audio data encoding method according to an embodiment of the present application; Figure 7 A schematic diagram of the bit lengths of quantized values of the original audio signal in the digital audio data encoding method according to an embodiment of the present application, which are ordered from low to high frequencies; Figure 8Schematic diagram of the bit length predicted by the bit length of the quantized values of the original audio signal whose frequencies are sorted from high to low in the digital audio data encoding method according to an embodiment of the present application.
[0026] The digital audio data encoding method of the present application embodiment may include the following steps: Figure 4 The steps S101 to S117 of determining the coded bits are shown. It should be understood that the execution order, number of times and content of the steps described herein can be adjusted according to actual needs, and the present application is not limited to the examples of the embodiments of this article.
[0027] In step S101, original message data is obtained.
[0028] In step S103, the original audio data is subjected to a modified discrete cosine transform (MDCT) or other transformation methods to transform the waveform of the audio signal of the original audio data from the time domain to the frequency domain to form a transformed audio data.
[0029] In step S105, the volume value of the audio signal of the converted audio data is divided by a gain value to obtain a numerical value, and the numerical value is rounded to an integer to quantize the converted audio data to form a quantized audio data.
[0030] In step S107, the bit lengths of the multiple initial quantization values are sorted from high frequency to low frequency. For example, Figure 7 The bit lengths of the multiple initial quantization values of the quantized audio signal data shown are arranged from low frequency to high frequency, and are converted into Figure 8 Shown is sorted from high frequency to low frequency.
[0031] In step S109, the signs of a plurality of initial quantization values of all frequencies in the quantized audio signal data are stored.
[0032] In step S111, the absolute values of a plurality of initial quantization values of all frequencies in the quantized audio signal data are taken in sequence to form a plurality of quantization values without positive or negative signs.
[0033] In step S113, a bit length prediction value is generated by predicting the bit length of the current quantization value according to the last quantization value among the multiple quantization values in the quantized information data, until the bit lengths of all the multiple quantization values are predicted in sequence from high frequency to low frequency. In this article, the quantization value currently being processed is referred to as the current quantization value, which can be any quantization value among the multiple quantization values, and the quantization value previously processed is referred to as the last quantization value.
[0034] In step S115, it is determined whether the bit length of the current quantization value is greater than the bit length prediction value. If the bit length of the current quantization value is not greater than the bit length prediction value, step S117 is executed. On the contrary, if the bit length of the current quantization value is greater than the bit length prediction value, step S119 is executed.
[0035] In step S117, the quotient is 0, and the current quantized value is used as the remainder, and the remainder value is directly stored (in a storage module such as a buffer) without being encoded.
[0036] In step S119, the bits of the current quantized value are used as a quotient, which is subsequently encoded.
[0037] Finally, the uncoded remainder and the coded and compressed quotient can be packaged into an audio bit stream and output to the audio playback end.
[0038] See also Figure 4 , Figure 5 , Figure 7 and Figure 8 ,in Figure 5 1 is a flowchart of the steps of predicting the bit length of the current quantized value according to the bit length of the previous quantized value and the bit length prediction value of the digital audio data encoding method according to the embodiment of the present application.
[0039] The digital audio data encoding method of the present application embodiment may include the following steps: Figure 5 The steps S201 to S205 of predicting the bit length of the current quantization value are included in the aforementioned step S113.
[0040] In step S201, the bit length of the previous quantization value is obtained.
[0041] In step S203, a bit length prediction value of the previous quantization value is obtained.
[0042] In step S205, the bit length prediction value of the previous quantized value, the bit length of the previous quantized value and the coefficient are substituted into the following equation to generate the bit length prediction value of the current quantized value:
[0043] P[n]=P[n-1]*a+B[n-1]*(1-a),
[0044] Where P[n] represents the bit length prediction value of the current quantization value, P[n-1] represents the bit length prediction value of the previous quantization value, B[n-1] represents the bit length of the previous quantization value, and a represents a coefficient between 0 and 1, which can be defined in advance according to needs.
[0045] After executing step S205, the above step S115 may be executed to determine the quotient and remainder values of other quantized values in the quantized audio signal data, wherein the remainder is directly stored without being encoded and compressed, while the quotient still needs to be encoded and compressed.
[0046] See also Figure 6 , which is a flow chart of the encoding steps of the digital audio data encoding method of an embodiment of the present application.
[0047] The above-mentioned step S119 of the digital audio data encoding method of the embodiment of the present application may include the following: Figure 6 The encoding steps S301 to S333 shown are performed after step S113.
[0048] In step S301, it is determined whether the bit length of the current quantized value is greater than the bit length prediction value. If the bit length of the current quantized value is not greater than the bit length prediction value, step S303 is executed.
[0049] In step S303, the quotient is determined to be 0, and the current quantized value is taken as the remainder, which is directly stored without being encoded.
[0050] If it is determined that the bit length of the current quantization value is greater than the bit length prediction value, steps S305 and S307 are executed in sequence.
[0051] In step S305: the current quantization value is taken as the quotient.
[0052] In step S307, it is determined whether the quotient is less than 2. If the quotient is less than 2, step S309 is executed. On the contrary, if it is determined in step S313 that the quotient is greater than 3, step S321 is then executed.
[0053] In step S309, the encoded character is the quotient.
[0054] On the contrary, if the quotient is not less than 2, steps S311 and S313 are then executed in sequence.
[0055] In step S311, the coded character is 2.
[0056] In step S313, it is determined whether the quotient value is greater than 3. If it is determined that the quotient is not greater than 3, steps S315 to S317 are sequentially executed.
[0057] In step S315, the number of characters "1" in the encoding string is determined according to the value of the quotient, and 0 to 3 characters "1" are added to the encoding string according to the determined number.
[0058] In step S317, the character "0" is added to the right of all the characters "1" to the encoded string as the least significant bit of the encoded string to complete the encoding of the quotient, so as to form the final encoded string in step S319.
[0059] For example, if the decimal quotient is 3 (binary "11"), the number of characters "1" in the encoding string is determined to be three, and then a character "1" is added to the right of the binary quotient "11" to form an initial encoding string "111" (a total of 3 characters "1"), and then the character "0" is added to the right of all characters "1" as the least significant bit to obtain the final encoding string "1110".
[0060] In step S321, the character "2" is added to the encoding string. For example, if the decimal quotient is 14 (1110 in binary), it is determined that 14 is greater than 3, so the character "2" is used as the most significant bit of the encoding string of the quotient.
[0061] In step S323, the two least significant bits of the binary quotient are sequentially added to the encoding string, including using the least significant bit of the quotient as the first bit to the right of the character "2" in the encoding string, and the first bit to the left of the least significant bit of the quotient as the second bit to the right of the character "2" in the encoding string. For example, if the decimal quotient is 14 (binary is 1110), the least significant bit of the binary quotient and the first bit to its left "01" are sequentially added to the encoding string, and the encoding string is "201".
[0062] In step S325, the remaining quotient value is shifted right by two bits.
[0063] In step S327, it is determined whether all the remaining values in the binary quotient are greater than 3. If so, steps S321 to S325 are executed again in sequence. If not, steps S329 to S333 are executed in sequence. For example, if the decimal quotient is 14 (1110 in binary), after executing step S323, all the remaining quotient values in the binary quotient are "11" (decimal value is "3"), which is not greater than 3, so step S329 is executed next.
[0064] In step S329, the number of characters "1" to be added is determined according to the decimal value of all bits remaining in the binary quotient after conversion, and then the determined number of characters "1" is added to the encoding string. For example, if the decimal quotient is 14 (binary 1110), three characters "1" are added to the right of the aforementioned encoding string "201" to form the encoding string "201111".
[0065] In step S331, the character "0" is added to the right of all the characters "1" as the least significant bit of the encoded string.
[0066] In step S333, a final coded string is formed. For example, if the decimal quotient is 14 (binary 1110), the final coded string "2011110" is obtained.
[0067] For another example, if the decimal quotient is "6" (binary is 110), the quotient "6" is judged to be greater than 3, and then the character "2" is used as the most significant bit of the encoding string. Next, the least significant bit of the binary quotient and the first bit "01" to its left are used as the first and second bits to the right of the character "2" in the encoding string, respectively, to form a encoding string of "201". Next, it is judged that the remaining binary quotient "1" is not greater than "3", so the remaining binary quotient "1" is converted to a decimal value of "1", and it is decided to add a character "1" to the encoding string, forming a encoding string of "2011". Finally, the character "0" is added as the least significant bit to obtain the final encoding string of "20110".
[0068] For another example, if the decimal quotient is "15" (binary 1111), when it is determined that the quotient "15" is greater than 3, the character "2" is used as the most significant bit of the encoding string. Next, the least significant bit of the binary quotient and the first bit "11" to its left are added to the encoding string, forming a encoding string of "211". Next, it is determined that the remaining binary quotient "11" (decimal quotient "3") is not greater than "3, so three characters "1" are added to the encoding string based on the remaining decimal quotient "3", forming a encoding string of "211111", so as to obtain the final encoding string of "2111110" (with only one character "2").
[0069] On the contrary, if it is determined in step S327 that the remaining quotient value is greater than 3, steps S321 to S325 are executed again.
[0070] For example, if the decimal quotient is "16" (binary is 10000), it is determined that the quotient "16" is greater than 3, so the first character, such as "2", is added as the most significant bit of the encoded string. Next, the least significant bit of the binary quotient and the first bit "00" to its left are added to the encoded string, forming a coded string of "200". At this time, it is determined that the remaining unprocessed quotient value in the binary quotient is "100", which is converted into a decimal quotient of "4", which is greater than 3. Therefore, the second character, such as "2", is added to the third bit to the right of the first character, forming a coded string of "2002". Next, the least significant bit "0" and the first bit "0" to its left of all the remaining quotient values "100" in the binary quotient are used as the first and second bits to the right of the second character, respectively, to form a coded string of "200200". At this time, it is determined again that the remaining unprocessed quotient value in the binary quotient is "1" which is less than 3, so the remaining decimal quotient value "1" is used to decide to add a character "1" to the encoding string, forming an encoding string of "2002001", and finally obtaining the final encoding string of "20020010" (with two characters "2").
[0071] For another example, if the decimal quotient is "20" (10100 in binary), after determining that the decimal quotient "20" is greater than 3, the first character "2" is added to the encoding string, and then the least significant bit of the binary quotient and the first bit "00" to its left are added to form the encoding string "200". Next, after determining that the remaining binary quotient "101" is converted to a decimal value of "5" and is greater than 3, the second character "2" is added to the encoding string to form the encoding string "2002". Next, the least significant bit of the remaining binary quotient "101" and the first bit "10" to its left are stored again as the first and second bits to the right of the second character, respectively, to form the encoding string "200210". Next, the remaining binary quotient "1" is determined to be less than 3, and accordingly a character "1" is added to the third bit to the right of the second character, and finally the character "0" is added as the least significant bit to obtain the final encoding string "20021010" (with two characters "2").
[0072] It is worth noting that the number of times N that steps S321 to S325 are executed depends on the size of each quotient. Steps S321 to S325 can be repeatedly executed N times until all bits in the quotient are processed, thereby determining the number N of characters in the final encoded string.
[0073] For example, if the decimal quotient is "63" (binary is 111111), it is determined that the quotient "63" is greater than 3, and then steps S321 and S323 are executed in sequence to obtain the encoding string "211". At this time, the remaining binary quotient is "1111", which is converted to decimal 15, which is greater than 3, so steps S321 and S323 are executed twice to obtain the encoding string "211211". At this time, the remaining binary quotient is "11", which is not greater than 3, so steps S329 to S333 are executed to sequentially add three characters "1" and one character "0" to the aforementioned encoding string to obtain the final encoding string "2112111110" (with two characters "2").
[0074] However, if the decimal quotient is 64 (binary is 1000000), the coded string obtained by executing steps S321 and S323 for the first time is "200". At this time, the remaining binary quotient is "10000", which is converted to decimal as 16, which is greater than 3, so steps S321 and S323 are executed twice to obtain the coded string "200200". At this time, the remaining binary quotient is "100", which is converted to decimal as 4, which is greater than 3, so steps S321 and S323 are executed three times to obtain the coded string "200200200". At this time, the remaining binary quotient is "1", which is less than 3, so steps S329 to S333 are executed to obtain the final coded string "20020020010" (with three characters "2").
[0075] For example, the final encoded value obtained may then be compressed using entropy coding. This is only an example, and the present application is not limited to the compression technology used.
[0076] As described above, multiple quotient values of all frequencies in the audio data are quantized sequentially from high frequency to low frequency for encoding to obtain multiple final encoded character strings, and finally the compressed final encoded character strings and all the remainder values that are directly stored without compression are packaged into an audio bit stream / frame and transmitted to the audio playback device.
[0077] At the audio playback end, the audio playback device needs to decompress and decode the original audio data before playing it. First, at the audio playback end, the audio bit stream is disassembled, the compressed audio data is decompressed to form multiple coded strings, and all quotients are obtained after decoding the multiple coded strings. Then, the bit length prediction value of the current quantization value is calculated from the bit length prediction value of the previous quantization value and the bit length of the previous quantization value, and the remainder is taken from the audio bit stream based on this predicted bit length; the quotient and the remainder are combined to restore the current quantization value, and all quantization values are iterated in this way, and the stored positive and negative signs are added to restore all the initial quantization values of the original audio data.
[0078] In summary, the present application provides a digital audio data encoding method, which has the following characteristics:
[0079] The quantized value is first subjected to adaptive bit length encoding and then entropy encoding to improve the compression rate;
[0080] Adaptive bit length coding predicts the bit length of the next value based on past values. Bits above the predicted bit length are encoded, and bits below the predicted bit length are directly stored without compression, reducing the amount of compression operations.
[0081] The correlation between the frequency values is used to reduce the error between the predicted value bit length and the actual bit length.
[0082] The contents disclosed above are only preferred feasible embodiments of the present application, and are not intended to limit the claims of the present application. Therefore, all equivalent technical changes made using the description and drawings of the present application are included in the claims of the present application.
Claims
1. A method for encoding digital information data, characterized in that: The digital information data encoding method comprises the following steps: (a) performing a modified discrete cosine transform on the original information data to transform the waveform of the information signal of the original information data from the time domain to the frequency domain to form a transformed information data; (b) dividing the converted information data by the obtained value of the gain value to obtain an integer value, so as to quantize the converted information data to form quantized information data; (c) storing the positive and negative signs of a plurality of initial quantization values of all frequencies in the quantized audio data; (d) taking absolute values of the initial quantization values in the quantized information data to respectively form a plurality of quantization values; (e) predicting the bit length of the current quantized value according to the last quantized value among the plurality of quantized values in the quantized information data to generate a bit length prediction value, until the bit lengths of all the plurality of quantized values are predicted in sequence from high frequency to low frequency; as well as (f) The bits whose bit length of the current quantization value is less than or equal to the bit length prediction value are called remainders and are directly stored without encoding. The bits whose bit length is greater than the bit length prediction value are called quotients and are subsequently encoded. If the bit length of the current quantization value is less than or equal to the bit length prediction value, its quotient is 0. Step (f) is repeatedly performed until all the multiple quantization values in the quantized audio data are processed.
2. The digital audio data encoding method according to claim 1, characterized in that: The digital information data encoding method also comprises the following steps: (g) Encode all quotients for the first time: determine whether the quotient is less than 2. If so, the encoding character is the quotient; if not, the encoding character is 2; (h) performing a double-step encoding on a quotient greater than or equal to 2: determining whether the quotient is greater than 3; if not, adding 0 to 3 characters "1" to the encoding string according to the quotient value, and finally adding the character "0" to indicate that the quotient encoding is complete and the subsequent steps are not executed; if yes, executing the subsequent steps (i) to (l); (i) Add the character "2" to the encoded string; (j) adding the two least significant bits of the quotient value to the encoded string in sequence; (k) the quotient value is shifted right by two bits; and (l) Determine whether the quotient value is greater than 3. If so, execute steps (i) to (k) again. If not, add 0 to 3 characters "1" to the encoding string based on the quotient value, and finally add the character "0" to indicate that the quotient encoding is complete.
3. The digital audio data encoding method according to claim 1, characterized in that: The digital information data encoding method also comprises the following steps: (m) sequentially obtaining the bit lengths of the plurality of quantized values sorted from low frequency to high frequency; and The bit lengths of the plurality of quantized values are sorted from high frequency to low frequency.
4. The digital audio data encoding method according to claim 1, characterized in that: The digital information data encoding method also comprises the following steps: (n) predicting the bit length of the current quantized value based on the bit length of the previous quantized value and the bit length prediction value of the previous quantized value, as represented by the following equation: P[n]=P[n-1]*a+B[n-1]*(1-a), Wherein P[n] represents the bit length prediction value of the current quantization value, P[n-1] represents the bit length prediction value of the previous quantization value, B[n-1] represents the bit length of the previous quantization value, and a represents a coefficient ranging from 0 to 1.
5. The digital audio data encoding method according to claim 1, characterized in that: The digital information data encoding method also comprises the following steps: Packing all directly stored remainders and the compressed final encoded string into an audio bit stream and transmitting it to the audio playback end; Decompressing the audio signal bit stream and decompressing the compressed data of the final encoded string to obtain all the encoded strings; Decode all the encoded strings to get all the quotients; Calculating the predicted value of the bit length of the current quantized value from the predicted value of the bit length of the previous quantized value and the bit length of the previous quantized value, and extracting a remainder from the signal bit stream according to the predicted bit length; combining the quotient and the remainder to recover the quantized value described so far; Calculate the bit length of the current quantized value, and then calculate the predicted bit length of the next quantized value by comparing it with the predicted bit length of the current quantized value; as well as After all the quantized values are calculated, the stored positive and negative signs are added to restore all the initial quantized values of the original audio signal data.
Citation Information
Patent Citations
Encoding method, decoding method, encoding device, decoding device, program, and recording medium
CN103460287A
Audio encoders, audio decoders, methods and computer programs adapting encoding and decoding of least significant bits
CN111933159A
Quantized global gain sequence number searching method and system for optimizing LC3 encoder
CN111951815A
Speech coding
CN1292914A
Methods and systems for bit allocation and partitioning in gain-shape vector quantization for audio coding
US20120232913A1
