Method, SBC codec and device for expanding sampling rate supported by SBC encoding and decoding
By setting an extended sampling rate and loudness bias table for the SBC codec, the problem that SBC codec cannot support high sampling rate is solved, achieving higher audio quality and better user experience.
Patent Information
- Application Number
- CN202310590836.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-23
- Publication Date
- 2025-07-22
- Estimated Expiration
- 2043-05-23
AI Technical Summary
The existing SBC codec formats cannot support higher audio sampling rates, resulting in the inability to fully utilize the high bandwidth of Bluetooth communication, the inability to transmit high-quality audio data, and the audio quality is insufficient to meet user needs.
By setting the extended sample rate, an extended 4- and 8-subband loudness bias table is generated, and the encoding rules of the frame header are redefined in the Bluetooth advanced audio distribution profile, so that the SBC codec can support higher sampling rates and use the extended subband loudness bias table for encoding and decoding.
It realizes that without increasing hardware costs, extending SBC codec supports higher sampling rates, improves audio quality, and meets users' needs for high-quality music.
Smart Images

Figure CN116566547B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of wireless communication technologies, and more particularly, to a method for expanding the sampling rate supported by SBC encoding and decoding, an SBC codec, and a device. Background Art
[0002] Bluetooth communication is increasingly commonly used in wireless devices for audio transmission. With the rapid development of Bluetooth technology, the transmission bandwidth of Bluetooth communication has expanded from the initial 1 Mbit / s to the current 24 Mbit / s, and the audio quality it can support has also improved accordingly. The channel bandwidth above Bluetooth 4.0 is already fully capable of supporting the transmission of high-quality audio data.
[0003] Audio coding formats commonly used for Bluetooth communication in mono or stereo transmission include Apt-X, AAC, and SBC, etc. Among them, the Apt-X format has the best encoding and decoding effect, but Apt-X requires specified devices to be adapted, so it is not convenient to popularize; similarly, AAC not only requires the Bluetooth headset to support playing AAC format files, but also requires the mobile phone side to support the transmission of AAC files at the same time to be used. Therefore, although its sound quality is better than the SBC format, its usage rate is still lower compared to the SBC format; while SBC (Sub-band coding) is the Bluetooth coding format compulsorily specified by the A2DP (Advanced Audio Distribution Profile) Bluetooth audio transmission protocol, and the SBC codec is an audio encoding and decoding system designed specifically for Bluetooth audio and video applications. Therefore, the Bluetooth audio chips in all Bluetooth devices will support the SBC coding format and the corresponding protocol, and the application range is very wide. However, currently, the highest sampling rate of the audio data source supported by the SBC encoding and decoding format in the Bluetooth audio chip can only reach 48 kHz, and it cannot support higher audio source sampling rates. Therefore, it has not been able to keep up with the development pace of Bluetooth technology, and has not effectively utilized the greatly improved Bluetooth transmission bandwidth. Therefore, it cannot support the encoding and decoding and transmission of high-quality audio data with higher sampling rates. In addition, as a relatively primitive Bluetooth coding and decoding format, the audio quality of SBC is not high enough to fully meet the needs of consumers to enjoy high-quality audio only by using general and basic configured Bluetooth headsets and other devices. Summary of the Invention
[0004] The present application is provided to solve the above problems existing in the prior art.
[0005] There is a need for a method, an SBC codec, a wireless device, and a medium for expanding the sampling rate supported by SBC encoding and decoding, which can perform SBC encoding on audio data frames according to the sampling rate of audio data, so that on the basis of supporting the original audio data sampling rate, SBC encoding and decoding can also be performed on audio data with an expanded sampling rate. As a result, SBC encoding and decoding can support the transmission of high-quality audio data with a higher sampling rate, making full use of the development of Bluetooth communication in terms of transmission bandwidth, and enabling the Bluetooth communication system to meet the user's demand for higher-quality music appreciation only by using the commonly supported SBC encoding and decoding without expanding the supported encoding and decoding methods.
[0006] According to a first aspect of the present application, there is provided a method for expanding the sampling rate supported by SBC encoding and decoding. The method is used for a wireless device with Bluetooth audio transmission function, and includes setting an expanded sampling rate; equally dividing the bandwidth corresponding to each set expanded sampling rate into 4 first sub-bands, and determining the first loudness corresponding to each first sub-band to generate an extended 4-sub-band loudness bias table used for SBC encoding at each expanded sampling rate; equally dividing the bandwidth corresponding to each set expanded sampling rate into 8 second sub-bands, and determining the second loudness corresponding to each second sub-band to generate an extended 8-sub-band loudness bias table used for SBC encoding at each expanded sampling rate; setting in the Bluetooth Advanced Audio Distribution Profile to use 3 bits in the frame header after SBC encoding and represent the expanded sampling rate according to a first encoding rule, and use 1 bit and represent the block length according to a second encoding rule; and performing SBC encoding on the audio data frame according to the sampling rate of the audio data, and when sending the SBC-encoded audio data frame, setting the bit position corresponding to the sampling rate in the frame header according to the sampling rate of the SBC-encoded audio data according to the first encoding rule, and setting the bit position corresponding to the block length according to the block length used in the SBC encoding according to the second encoding rule, so that the wireless device receiving the SBC-encoded audio data frame decodes the audio data frame using the extended 4-sub-band loudness bias table and / or the extended 8-sub-band loudness bias table when the audio data has an expanded sampling rate, and decodes the audio data frame using the original 4-sub-band loudness bias table and / or the original 8-sub-band loudness bias table when the audio data has the original sampling rate.
[0007] According to a second aspect of the present application, there is provided an SBC codec for expanding the sampling rate supported by SBC encoding and decoding. The SBC codec is used for a wireless device with Bluetooth audio transmission function, and when encoding and decoding audio data, the SBC codec executes the method for expanding the sampling rate supported by SBC encoding and decoding according to various embodiments of the present application.
[0008] According to a third aspect of the present application, a wireless device is provided. The wireless device has a Bluetooth audio transmission function and includes an SBC codec supporting the sampling rate extended by the SBC codec according to the embodiments of the present application.
[0009] According to a fourth aspect of the present application, a non-transitory computer-readable storage medium is provided, on which computer-executable instructions are stored. When the computer-executable instructions are loaded into an SBC codec in a wireless device having a Bluetooth audio transmission function, the SBC codec executes a method for extending the sampling rate supported by the SBC codec according to the embodiments of the present application.
[0010] By using the method, SBC codec, wireless device, and medium for extending the sampling rate supported by the SBC codec according to various embodiments of the present application, by generating a 4-subband loudness bias table and an 8-subband loudness bias table required for SBC encoding for the extended sampling rate, and redefining the encoding rules for the bits corresponding to the sampling rate and the bits regarding the block length in the original frame header in the Bluetooth Advanced Audio Distribution Profile, when the receiving end decodes the SBC-encoded audio data frame, it can identify the sampling rate of the audio data according to the new encoding rules, so as to decode the audio data frame with the extended sampling rate using the extended 4-subband loudness bias table and / or the extended 8-subband loudness bias table, and use the original 4-subband loudness bias table and / or the original 8-subband loudness bias table to decode the audio data frame with the original sampling rate. According to the embodiments of the present application, the SBC codec can further support an extended sampling rate with a higher sampling rate on the basis of supporting the original sampling rate, thereby making full use of the higher Bluetooth communication transmission bandwidth, so that the Bluetooth communication system can meet the user's need for higher-quality music appreciation only by using the commonly supported SBC codec without expanding the supported codec methods. BRIEF DESCRIPTION OF THE DRAWINGS
[0011] In the drawings, which are not necessarily to scale, the same reference numerals may describe similar components in different views. The same reference numerals with letter suffixes or different letter suffixes may represent different instances of similar components. The drawings generally illustrate various embodiments by way of example and not limitation, and are used together with the description and the claims to explain the disclosed embodiments. Where appropriate, the same reference numerals are used throughout the drawings to refer to the same or similar parts. Such embodiments are illustrative and are not intended to be an exhaustive or exclusive embodiment of the device or method.
[0012] Figure 1 A flowchart showing a method for extending the sampling rate supported by the SBC codec according to an embodiment of the present application.
[0013] Figure 2 Shows the standard equal-loudness curve for calculating the sub-band loudness bias table according to an embodiment of the present application.
[0014] Figure 3 Shows the parameter table for calculating the standard equal-loudness curve according to an embodiment of the present application.
[0015] Figure 4 Shows a comparison diagram between the audio spectrogram after SBC encoding / decoding using the 8-sub-band loudness bias table according to an embodiment of the present application and the audio spectrogram of the original SBC encoding / decoding.
[0016] Figure 5 Shows a partial composition schematic diagram of a wireless device according to an embodiment of the present application. Detailed implementation manners
[0017] To enable those skilled in the art to better understand the technical solutions of the present application, the present application will be described in detail below in conjunction with the accompanying drawings and specific implementation manners. The embodiments of the present application will be further described in detail below in conjunction with the accompanying drawings and specific examples, but this is not a limitation to the present application.
[0018] The "first", "second" and similar terms used in the present application do not indicate any order, quantity or importance, but are only used for distinction. Words such as "including" or "comprising" mean that the elements before this word cover the elements listed after this word, and do not exclude the possibility of also covering other elements. The execution order of each step in the method described in the present application in conjunction with the accompanying drawings is not limited. As long as the logical relationship between each step is not affected, several steps can be integrated into a single step, a single step can be decomposed into multiple steps, or the execution order of each step can be adjusted according to specific requirements.
[0019] It should also be understood that the term "and / or" in the present application is only a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can mean: A exists alone, A and B exist simultaneously, and B exists alone. In addition, the character " / " in the present application generally means that the associated objects before and after are in an "or" relationship.
[0020] The present application provides a method for expanding the sampling rate supported by SBC encoding / decoding. This method is used for wireless devices with Bluetooth audio transmission functions, such as mobile phones supporting the connection of Bluetooth headsets, Bluetooth headsets, pads with Bluetooth interfaces, and wearable devices, etc., which are not listed one by one here.
[0021] Figure 1 Shows a flow schematic diagram of the method for expanding the sampling rate supported by SBC encoding / decoding according to an embodiment of the present application.
[0022] As Figure 1As shown in the figure, in step 101, it is first necessary to set an extended sampling rate. Here, the "extended sampling rate" is relative to the sampling rate of the audio data source that the original SBC codec can support. According to the provisions of the A2DP (Advanced Audio Distribution Profile) Bluetooth audio transmission protocol, the sampling rates that the current SBC codec can support include 16 kHz, 32 kHz, 48 kHz, and 44.1 kHz. Sampling rates other than the above cannot be supported by the existing SBC codec format and all belong to the extended sampling rate.
[0023] Next, in steps 102 and 103, the 4-subband loudness bias tables and 8-subband loudness bias tables corresponding to each extended sampling rate will be calculated respectively. In the SBC codec, the number of subbands can be 4 or 8. Therefore, the 4-subband loudness bias parameter and the 8-subband loudness bias parameter are the parameters that must be used to set the subband filter bank in the SBC codec. The A2DP protocol gives the 4-subband loudness bias parameters and 8-subband loudness bias parameters corresponding to each sampling rate among 16 kHz, 32 kHz, 48 kHz, and 44.1 kHz. Therefore, in the embodiments according to the present application, only the 4-subband loudness bias tables and 8-subband loudness bias tables corresponding to each extended sampling rate need to be calculated.
[0024] Specifically, in step 102, the bandwidth corresponding to each set extended sampling rate is equally divided into 4 first subbands, and the first loudness corresponding to each first subband is determined to generate an extended 4-subband loudness bias table for SBC encoding at each extended sampling rate. In step 103, the bandwidth corresponding to each set extended sampling rate is equally divided into 8 second subbands, and the second loudness corresponding to each second subband is determined to generate an extended 8-subband loudness bias table for SBC encoding at each extended sampling rate.
[0025] Next, it is necessary to set the frame header format in the Bluetooth Advanced Audio Distribution Profile (A2DP) that can support the extended sampling rate. Specifically, in step 104, it is set in the Bluetooth Advanced Audio Distribution Profile that 3 bits are used in the frame header after SBC encoding and the extended sampling rate is represented according to the first encoding rule, and 1 bit is used and the block length is represented according to the second encoding rule. That is, the number of bits originally used to represent the sampling rate in the frame header is extended from 2 bits to 3 bits, while the 2 bits originally used to represent the block length are shortened to 1 bit, so as to keep the sampling rate + block length still occupying a total of 4 bits to represent, and the lengths and definitions of other bits in the A2DP remain unchanged.
[0026] After resetting the frame header format, in step 105, the audio data frames can be SBC encoded according to the sampling rate of the audio data. When sending the SBC-encoded audio data frames, according to the sampling rate of the SBC-encoded audio data, the bit positions corresponding to the sampling rate in the frame header are set according to the first encoding rule, and the bit positions corresponding to the block length are set according to the second encoding rule according to the block length used in the SBC encoding, so that a wireless device receiving the SBC-encoded audio data frames can use an extended 4-band loudness bias table and / or an extended 8-band loudness bias table to decode the audio data frames when the audio data has an extended sampling rate, and use the original 4-band loudness bias table and / or the original 8-band loudness bias table to decode the audio data frames when the audio data has the original sampling rate.
[0027] According to the method for supporting the sampling rate of extended SBC encoding and decoding according to an embodiment of the present application, when an extended sampling rate is set, a 4-band loudness bias table and an 8-band loudness bias table for SBC encoding and decoding are generated for each extended sampling rate, and the encoding rule of the sampling rate in the frame header is redefined in the Bluetooth Advanced Audio Distribution Profile, so that the receiving end can not only decode the encoded data with the original sampling rate, but also use the extended loudness bias table to decode the SBC-encoded data with the extended sampling rate. In particular, the extended sampling rate can be a sampling rate higher than 48 kHz supported by the current SBC encoding. Therefore, all Bluetooth audio devices do not need to expand other Bluetooth audio encoding and decoding formats, and can use only the compulsorily supported SBC encoding and decoding to transmit high-quality audio with a higher sampling rate using a higher Bluetooth communication transmission bandwidth, meeting the user's need to achieve higher-quality music appreciation at a lower cost.
[0028] It should be noted that the first encoding rule for defining the extended sampling rate and the second encoding rule for defining the block length are not unique, and both can be set according to needs. The present application does not make specific regulations as long as the encoding end and the decoding end are consistent, that is, when the decoding end decodes the SBC-encoded audio data, it decodes the bit positions corresponding to the sampling rate in the frame header according to the first encoding rule and decodes the bit positions corresponding to the block length according to the second encoding rule, so as to be able to correctly decode the encoded data according to the sampling rate and block length defined by the corresponding bit positions.
[0029] In some embodiments, since the number of bits used to represent the sampling rate in the frame header is 1 bit more than before, the number of extended sampling rates can be 1, 2, 3, or at most 4, and at least includes 96 kHz. In this way, the SBC encoding and decoding can be extended from the previous maximum support of 48 kHz to support 96 kHz. In other embodiments, in addition to 96 kHz, the extended sampling rates can also include higher or lower sampling rates, and the present application does not limit this.
[0030] Merely by way of example, when the number of the extended sampling rates is 4, the extended sampling rates include a first extended sampling rate, a second extended sampling rate, a third extended sampling rate, and a fourth extended sampling rate. The first encoding rule includes: the 3 bits corresponding to the sampling rate in the frame header are encoded according to the following correspondence: 000 corresponds to 16 kHz, 001 corresponds to 32 kHz, 010 corresponds to 44.1 kHz, 011 corresponds to 48 kHz, 100 corresponds to the first extended sampling rate, 101 corresponds to the second extended sampling rate, 110 corresponds to the third extended sampling rate, and 111 corresponds to the fourth extended sampling rate. That is, the four encodings with the highest bit being 1 are used for the extended sampling rates, and the four encodings 000, 001, 010, and 011 with the highest bit being 0 are kept in one-to-one correspondence with the original definitions of the encodings 00, 01, 10, and 11.
[0031] In other embodiments, the second encoding rule for the block length includes encoding the 1 bit corresponding to the block length in the frame header according to the following correspondence: 0 corresponds to a block length of 8, and 1 corresponds to a block length of 16. It is found in the experimental process of presenting this application that removing the original block lengths 4 and 12 in the original SBC encoding has little impact on the performance of the SBC encoding. In other cases, the block length can also be set otherwise through the second encoding rule, for example, 0 corresponds to a block length of 4, 1 corresponds to a block length of 12, etc. The present application does not make specific limitations on this, as long as it can enable the selection of a relatively small block length and a relatively large block length as needed when performing SBC encoding.
[0032] The following is the specific method for generating the extended sub-band loudness bias table. For 4 sub-bands, first, the bandwidth corresponding to each extended sampling rate can be equally divided into 4 first sub-bands. For each first sub-band, based on the standard equal-loudness curve, the first minimum sound pressure level corresponding to this first sub-band is calculated. Based on each first minimum sound pressure level, the first loudness corresponding to each first sub-band is calculated. Based on the first loudness corresponding to the 4 sub-bands calculated by the above method, the extended 4-sub-band loudness bias table used for SBC encoding at each extended sampling rate is generated. Among them, there are as many extended 4-sub-band loudness bias tables as there are extended sampling rates. During SBC encoding, the matching extended 4-sub-band loudness bias table is used for encoding corresponding to the sampling rate of the audio data source.
[0033] Similarly, for 8 sub-bands, first, the bandwidth corresponding to each extended sampling rate can be equally divided into 8 second sub-bands. For each second sub-band, based on the standard equal-loudness curve, the second minimum sound pressure level corresponding to this second sub-band is calculated. Based on each second minimum sound pressure level, the second loudness corresponding to each second sub-band is calculated. Based on the second loudness corresponding to the 8 second sub-bands calculated by the above method, the extended 8-sub-band loudness bias table used for SBC encoding at each extended sampling rate is generated. Among them, there are as many extended 8-sub-band loudness bias tables as there are extended sampling rates. During SBC encoding, the matching extended 8-sub-band loudness bias table is used for encoding corresponding to the sampling rate of the audio data source.
[0034] The following will take 4 sub-bands as an example to introduce the specific steps for generating the sub-band loudness bias table.
[0035] Step S1: For the extended sampling rate fs e , for example, the bandwidth corresponding to the extended sampling rate fs e can be equally divided into 4 first sub-bands bw1, bw2, bw3, bw4, as shown in formula (1):
[0036]
[0037] Step S2: According to formula (2), calculate the first minimum sound pressure level mspl i within each first sub-band bw i under the reference loudness level:
[0038] mspl i = min(LL2SPL(f)), f ∈ bw i Formula (2)
[0039] Among them, since on the standard equal-loudness curve, the variation trends of the curves corresponding to each loudness level are basically the same. Therefore, only as an example, the reference loudness level can be taken as 50 phon, for example, or in the case of frequency bands, any other loudness level between the loudness level of the audible threshold (0 phon) and 90 phon (the 100 phon loudness level is also applicable in some frequency bands) can be selected. Experiments show that the specific value of the reference loudness level has no significant influence on the calculation of the first minimum sound pressure level mspl i and thus this application places no restrictions on it. LL2(f) is calculated according to formula (3):
[0040]
[0041] Among them, A f is calculated according to formula (4):
[0042]
[0043] In formula (4), L N is the lowest loudness level of the standard equal-loudness curve within the first sub-band bw i , with the unit of phon; L U is the amplitude of the linear transfer function normalized at 1000 Hz, with the unit of dB; a f is the loudness perception index at the frequency corresponding to L N ; T f is the auditory threshold at the frequency corresponding to L N , with the unit of dB;
[0044] Step S3: Calculate the extended 4-sub-band loudness bias table loudness off4b :
[0045] loudness off4b = [M2L(mspl1), M2L(mspl2), M2L(mspl3), M2L(mspl4)] Formula (5)
[0046] Among them, M2L(mspl i ) is calculated according to formula (6):
[0047]
[0048] Among them, ROUND(·) represents rounding to the nearest integer, L p is the reference sound pressure level and L P = 50 dB.
[0049] When calculating the extended 8-subband loudness offset table, the bandwidth corresponding to the extended sampling rate needs to be equally divided into 8 subbands, and the number of elements included in the finally calculated extended 8-subband loudness offset table is 8. Other steps are similar to the calculation steps S1 - S3 of the above-mentioned extended 4-subband loudness offset table, and will not be elaborated here.
[0050] In some other embodiments, it is not limited to calculating the 4-subband / 8-subband loudness offset table for SBC encoding and decoding based on the extended sampling rate. It is also possible to generate the corresponding 4-subband / 8-subband loudness offset table for the original sampling rates, namely 16 kHz, 32 kHz, 48 kHz, and 44.1 kHz sampling rates for SBC encoding and decoding. This application does not make any restrictions on this.
[0051] The following combines Figure 2 and Figure 3 to illustrate the specific method for generating the 4-subband loudness offset table. Figure 2 FIG. shows the standard equal-loudness curve for calculating the subband loudness offset table according to an embodiment of the present application. Figure 3 FIG. shows the parameter table for calculating the standard equal-loudness curve according to an embodiment of the present application.
[0052] Assume that it is necessary to calculate the 8-subband loudness offset table with a sampling rate of 16 kHz and a corresponding bandwidth of 8 kHz. Then, first, in step S1, the 8 kHz bandwidth is equally divided into 8 subbands as follows:
[0053]
[0054] Then, in step S2, calculate the lowest sound pressure level mspl at the reference loudness level within each subband bw i In the standard equal-loudness curve shown in i . A total of 11 curves from the audible threshold ( Figure 2 the bottommost dotted line, corresponding to a loudness level of 0 phon) to 100 phon are shown. Taking the reference loudness level of 50 phon as an example, by reading the lowest sound pressure level mspl Figure 2 in each subband bw i on the curve 201 with a loudness level of 50 phon, or by using formulas (2) - (4) and querying the corresponding parameter values in the parameter table in i Figure 3 to calculate the lowest sound pressure level mspl i in each subband bw i , the following can be obtained:
[0055] mspl = [mspl1, mspl2, mspl3, mspl4, mspl5, mspl6, mspl7, mspl8]
[0056] = [50, 49.6, 46.1, 47.1, 50.5, 56.1, 59, 61.5]
[0057] Next, in step S3, using formulas (5) and (6), the following can be calculated:
[0058] loudness off8b = [M2L(mspl1), M2L(mspl2), …, M2L(mspl8)] = [0, 0, -2, -2, 0, 2, 2, 4]
[0059] In some other embodiments, when the bandwidth corresponding to the extended sampling rate exceeds the frequency range (the highest frequency is about 12500 Hz) of the standard equal-loudness curve shown in Figure 2 and the parameter table for calculating the standard equal-loudness curve shown in Figure 3 For example, for a sampling rate of 96 kHz, the corresponding bandwidth is 48 kHz. Taking the calculation of the 8-subband loudness bias table as an example, the 48 kHz bandwidth can be divided into 8 subbands ([0, 6 kHz], [6 kHz, 12 kHz], [12 kHz, 18 kHz], …, [40 kHz, 48 kHz]). For the first two subbands [0, 6 kHz] and [6 kHz, 12 kHz], the corresponding loudness can be calculated based on Figure 2 or Figure 3 and formulas (2) - (6): M2L(mspl1) = -2, M2L(mspl2) = 2. In Figure 2 , on curve 201 with a loudness level of 50 phon, curve 202 with a loudness level of 60 phon, curve 203 with a loudness level of 70 phon, and curve 204 with a loudness level of 80 phon, the trends of the respective loudness curves predicted by the experimenter are schematically shown by dotted lines. It can be seen that in at least one frequency range where the frequency is higher than 12500 Hz, the loudness curve shows a monotonically increasing trend. Therefore, the loudness of the third subband can also be obtained, that is: M2L(mspl3) = 4. Next, for the loudness corresponding to subbands 4 - 8, considering the monotonicity of the loudness curve, it can be predicted based on the loudness values calculated according to the chart before. Only as an example, one specific method is linear extrapolation, that is: mspl4 = mspl3 + (mspl3 - mspl2), mspl5 = mspl4 + (mspl4 - mspl3), mspl6 = mspl5 + (mspl5 - mspl4), mspl7 = mspl6 + (mspl6 - mspl5), mspl8 = mspl7 + (mspl7 - mspl6). The 8-subband loudness bias table generated according to the above method is: loudnessoff8b = [-2, 2, 4, 6, 8, 10, 12, 14]. After repeated experimental verification, when this 8-subband loudness offset table is used for SBC encoding and decoding, the decoded audio has better audio quality. In some other embodiments, other methods can also be used to predict the subband loudness that cannot be obtained from the standard equal-loudness curve, or adjust the loudness offset table based on experimental results, etc. The present application does not limit this.
[0060] Figure 4 Shows a comparison diagram between the spectrogram of the audio after SBC encoding and decoding using the 8-subband loudness offset table according to the embodiments of the present application and the spectrogram of the original SBC-encoded and decoded audio.
[0061] Figure 4 Shows the spectrogram of the audio with a bandwidth of 8 kHz and a sampling rate of 16 kHz for SBC encoding and decoding with 8 subbands and a bit pool of 13. The upper half is the spectrogram of the original SBC-encoded and decoded audio, and the lower half is the spectrogram of the audio after SBC encoding and decoding using the 8-subband loudness offset table according to the embodiments of the present application. From Figure 4 it can be seen that in the spectrogram of the audio corresponding to the original SBC in the upper half, as shown at positions 401, 402, and 403, obvious sharp noises appear. This is caused by the relatively large quantization errors of the bit allocation for quantization of each subband corresponding to the loudness offset table of the original SBC encoding and decoding at high frequencies. The sharp noises that occasionally appear during audio playback will bring a bad experience to users. And as Figure 4 shown in the lower half, the audio after SBC encoding and decoding using the 8-subband loudness offset table of the present application has an overly smooth amplitude at high frequencies, and no obvious large-amplitude noises appear, and the audio is more gentle during playback. In addition, by comparing the spectrogram of the audio corresponding to the original SBC in the upper half and the spectrogram of the audio after SBC encoding and decoding using the 8-subband loudness offset table of the present application in the lower half, it can also be seen that at low frequencies (for example, between 3 kHz and 4 kHz), the details of the spectrogram in the lower half are richer, there are fewer burrs, and the amplitude transition is also smoother. This indicates that the human voice in the low-frequency band of the audio encoded and decoded using the SBC of the present application will be clearer, and the user experience will also be more comfortable.
[0062] Thus, it can be seen that the method for expanding the sampling rate supported by SBC encoding and decoding according to the embodiments of the present application can not only enable SBC encoding and decoding to support the expanded sampling rate, but also the audio after SBC encoding and decoding using the subband loudness offset table of this method has less audio noise, higher audio quality, and better user listening experience, especially at high frequencies.
[0063] In some embodiments, the extended 4-band loudness bias table, the extended 8-band loudness bias table required for SBC encoding and decoding, or the 4-band / 8-band loudness bias table required for SBC encoding and decoding of the original sampling rate according to the method of the embodiments of the present application can be calculated by using the method according to the embodiments of the present application for each intended extended sampling rate and / or the original sampling rate before the wireless device with Bluetooth audio transmission function leaves the factory, and the 4-band / 8-band loudness bias table corresponding to each sampling rate is stored in the storage area of the wireless device, so as to be directly called when the wireless device performs SBC encoding and decoding. In this way, the burden of real-time calculation of the wireless device can be further reduced.
[0064] According to an embodiment of the present application, there is also provided an SBC codec for extending the sampling rate supported by SBC encoding and decoding. The SBC codec is used for a wireless device with Bluetooth audio transmission function. When encoding and decoding audio data, the SBC codec executes the method for extending the sampling rate supported by SBC encoding and decoding according to each embodiment of the present application.
[0065] According to an embodiment of the present application, there is also provided a wireless device. Figure 5 A partial schematic diagram of the wireless device according to an embodiment of the present application is shown. As Figure 5 shown, the wireless device 500 has a Bluetooth audio transmission function and at least includes an SBC codec 501 for extending the sampling rate supported by SBC encoding and decoding according to each embodiment of the present application. The SBC codec 501 implements the method for extending the sampling rate supported by SBC encoding and decoding according to each embodiment of the present application and is capable of performing SBC encoding and decoding on both audio data having the original sampling rate supported by the original SBC encoding and decoding and audio data having an extended sampling rate.
[0066] In some other embodiments, the wireless device 500 may also have a memory or storage area (not shown) for storing the 4-band / 8-band loudness bias table corresponding to each sampling rate calculated by using the method according to the embodiments of the present application. The above memory / storage area may be a non-transitory computer-readable medium, such as a read-only memory (ROM), a random access memory (RAM), a phase change random access memory (PRAM), a static random access memory (SRAM), a dynamic random access memory (DRAM), an electrically erasable programmable read-only memory (EEPROM), other types of random access memories (RAM), a flash drive or other forms of flash memory, a cache, a register, a static memory, a compact disc read-only memory (CD-ROM), a digital versatile disc (DVD) or other optical memories, a cassette tape or other magnetic storage devices, or any other possible non-transitory medium used for storing information or instructions that can be accessed by a computer device.
[0067] It should be noted that, according to the method for expanding the sampling rate supported by SBC encoding and decoding described in various embodiments of the present application, on the basis of the original SBC codec in a wireless device with Bluetooth audio transmission function, it can be achieved only by, for example, updating the software of the SBC codec or firmware such as IP Core, and setting A2DP, without any hardware modification or upgrade, and even without increasing the types of Bluetooth audio encoding and decoding formats supported by the wireless device. Thus, the existing Bluetooth wireless device can be upgraded very conveniently and at low cost, so that the upgraded wireless device can support the expanded sampling rate not supported by the original SBC encoding and decoding, especially the sampling rate of 96 kHz or even higher commonly used by high-quality audio sources. Moreover, for the audio after SBC encoding and decoding using the sub-band loudness bias table of this method, especially the audio at high frequencies, the audio noise is smaller than that of the original SBC encoding and decoding, and the decoded audio quality is higher, enabling users to experience a higher-quality listening experience matching the high-sampling-rate audio source.
[0068] According to an embodiment of the present application, there is also provided a non-transitory computer-readable storage medium, on which computer-executable instructions are stored. When the computer-executable instructions are loaded into the SBC codec in a wireless device with Bluetooth audio transmission function, the SBC codec executes the method for expanding the sampling rate supported by SBC encoding and decoding as described in various embodiments of the present application.
[0069] The non-transitory computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server or a data center integrating one or more available media. For example, the medium can be a magnetic medium (such as a floppy disk, a hard disk, a magnetic tape), an optical medium (such as a DVD), or a semiconductor medium (such as a solid-state drive), etc. It should also be understood that the non-transitory computer-readable medium in the present application can be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory, etc.
[0070] In the implementation process, each step of the above method for extending the sampling rate supported by SBC codec can be completed by the integrated logic circuit of the hardware in the SBC codec or the wireless device or the instructions in the form of software. The steps of the method disclosed in combination with the embodiments of the present application can be directly embodied as loading the instructions stored in the non-transitory computer-readable medium into the SBC codec and executed by the hardware processor, or completed by the combination of the hardware and software modules of the SBC codec. The software module can be located in the random access memory, flash memory, read-only memory, programmable read-only memory or electrically erasable programmable memory, register and other mature storage media in the art. Among them, the SBC codec can also be uniformly implemented by the system on chip (SoC) in the wireless device. To avoid repetition, it will not be described in detail here.
[0071] In addition, although exemplary embodiments have been described herein, the scope includes any and all embodiments based on the present application having equivalent elements, modifications, omissions, combinations (e.g., schemes that cross various embodiments), adaptations or changes.
[0072] The elements in the claims will be broadly interpreted based on the language used in the claims and are not limited to the examples described in this specification or during the implementation of the present application, and the examples will be interpreted as non-exclusive. Therefore, this specification and the examples are intended to be considered only as examples, and the true scope and spirit are indicated by the full scope of the claims and their equivalents.
[0073] The order of the steps in the present application is merely exemplary and not restrictive. Without affecting the implementation of the present application (without destroying the logical relationship between the required steps), the execution order of the steps can be adjusted, and the various embodiments obtained after the adjustment still fall within the scope of the present application.
[0074] The above description is intended to be illustrative rather than restrictive. For example, the above examples (or one or more of them) can be used in combination with each other. For example, those of ordinary skill in the art can use other embodiments when reading the above description. In addition, in the above specific implementation manner, various features can be grouped together to simplify the present application. This should not be construed as an intention that the disclosed features that are not claimed are necessary for any claim. On the contrary, the subject matter of the present invention can be less than all the features of a specific disclosed embodiment. Thus, the claims are incorporated herein as examples or embodiments into the specific implementation manner, where each claim independently serves as a separate embodiment, and considering these embodiments, they can be combined with each other in various combinations or permutations. The scope of the present invention should be determined with reference to the claims and the full scope of the equivalent forms empowered by these claims.
Claims
1. A method for expanding the sampling rate supported by SBC encoding and decoding, characterized in that, The method is used for a wireless device with Bluetooth audio transmission function, and includes: Setting an extended sampling rate; Dividing the bandwidth corresponding to each set extended sampling rate into 4 first sub-bands equally, and determining the first loudness corresponding to each first sub-band, so as to generate an extended 4-sub-band loudness bias table for SBC encoding at each extended sampling rate; Dividing the bandwidth corresponding to each set extended sampling rate into 8 second sub-bands equally, and determining the second loudness corresponding to each second sub-band, so as to generate an extended 8-sub-band loudness bias table for SBC encoding at each extended sampling rate; Setting to use 3 bits in the frame header after SBC encoding and representing the extended sampling rate according to a first encoding rule, and using 1 bit and representing the block length according to a second encoding rule in the Bluetooth Advanced Audio Distribution Profile; and Performing SBC encoding on the audio data frame according to the sampling rate of the audio data, and when sending the audio data frame after SBC encoding, setting the bit position corresponding to the sampling rate in the frame header according to the sampling rate of the SBC-encoded audio data according to the first encoding rule, and setting the bit position corresponding to the block length according to the block length adopted by the SBC encoding according to the second encoding rule, so that the wireless device receiving the audio data frame after SBC encoding uses the extended 4-sub-band loudness bias table and / or the extended 8-sub-band loudness bias table to decode the audio data frame when the audio data has an extended sampling rate, and uses the original 4-sub-band loudness bias table and / or the original 8-sub-band loudness bias table to decode the audio data frame when the audio data has the original sampling rate.
2. The method according to claim 1, wherein Dividing the bandwidth corresponding to each set extended sampling rate into 4 first sub-bands equally, and determining the first loudness corresponding to each first sub-band, so as to generate an extended 4-sub-band loudness bias table for SBC encoding at each extended sampling rate specifically includes: dividing the bandwidth corresponding to each extended sampling rate into 4 first sub-bands equally, for each first sub-band, calculating the first minimum sound pressure level corresponding to this first sub-band based on the standard equal-loudness curve, calculating the first loudness corresponding to each first sub-band based on each first minimum sound pressure level, and generating an extended 4-sub-band loudness bias table for SBC encoding at each extended sampling rate based on each first loudness; Dividing the bandwidth corresponding to each set extended sampling rate into 8 second sub-bands equally, and determining the second loudness corresponding to each second sub-band, so as to generate an extended 8-sub-band loudness bias table for SBC encoding at each extended sampling rate specifically includes: dividing the bandwidth corresponding to each extended sampling rate into 8 second sub-bands equally, for each second sub-band, calculating the second minimum sound pressure level corresponding to this second sub-band based on the standard equal-loudness curve, calculating the second loudness corresponding to each second sub-band based on each second minimum sound pressure level, and generating an extended 8-sub-band loudness bias table for SBC encoding at each extended sampling rate based on each second loudness.
3. The method according to claim 1 or 2, characterized in that, The method further includes: when decoding the audio data encoded by SBC, decoding the bit corresponding to the sampling rate in the frame header according to a first coding rule, and decoding the bit corresponding to the block length according to a second coding rule.
4. The method according to claim 1 or 2, characterized in that, The number of the extended sampling rates is any value in 1-4, and the extended sampling rates at least include 96 kHz.
5. The method according to claim 4, characterized in that, When the number of the extended sampling rates is 4, the extended sampling rates include a first extended sampling rate, a second extended sampling rate, a third extended sampling rate, and a fourth extended sampling rate, and the first coding rule includes: The 3 bits corresponding to the sampling rate in the frame header are encoded according to the following corresponding relationship: 000 corresponds to 16 kHz, 001 corresponds to 32 kHz, 010 corresponds to 44.1 kHz, 011 corresponds to 48 kHz, 100 corresponds to the first extended sampling rate, 101 corresponds to the second extended sampling rate, 110 corresponds to the third extended sampling rate, and 111 corresponds to the fourth extended sampling rate.
6. The method according to claim 1 or 2, characterized in that, The second coding rule includes: the 1 bit corresponding to the block length in the frame header is encoded according to the following corresponding relationship: 0 corresponds to a block length of 8, and 1 corresponds to a block length of 16.
7. The method according to claim 2, wherein The method further includes generating an extended 4-subband loudness bias table used for SBC encoding at each extended sampling rate according to the following steps: S1: For the extended sampling rate fs e , divide the bandwidth corresponding to the extended sampling rate fs e into four first sub-bands bw1, bw2, bw3, bw4 equally, as shown in formula (1): S2: Calculate the first minimum sound pressure level mspl at the reference loudness level within each first sub-band bw according to formula (2). i within the first minimum sound pressure level mspl at the reference loudness level i :[[]]END]] mspl i = min(LL2SPL(f)), f ∈ bw i Formula (2) wherein, LL2SPL(f) is calculated according to formula (3): Among them, A f Calculate according to formula (4): In formula (4), L N is the lowest loudness level within the first sub-band bw i , in phon; L U is the magnitude of the linear transfer function normalized at 1000 Hz, in dB; a f is the loudness perception index at the frequency corresponding to L N ; T f is the auditory threshold at the frequency corresponding to L N , in dB; S3: Calculate the loudness of the extended 4 sub - bands according to formula (5). off4b : loudness off4b = [M2L(mspl1), M2L(mspl2), M2L(mspl3), M2L(mspl4)] Formula (5) Among them, M2L(mspl i ) is calculated according to formula (6): Among them, ROUND(·) represents rounding to the nearest integer, and L p is the reference sound pressure level and L P = 50 dB.
8. The method according to claim 1 or 2, characterized in that The method further includes: Before the wireless device leaves the factory, storing the extended 4-subband loudness bias table and the extended 8-subband loudness bias table calculated based on each extended sampling rate in the storage area of the wireless device.
9. An SBC codec that extends the sampling rate supported by SBC encoding and decoding, characterized in that, The SBC codec is used for a wireless device with a Bluetooth audio transmission function. When the SBC codec encodes and decodes audio data, it executes the method for the sampling rate supported by the extended SBC encoding and decoding as described in any one of claims 1-8.
10. A wireless device, characterized in that, The wireless device has a Bluetooth audio transmission function and includes an SBC codec that supports the sampling rate of the extended SBC encoding and decoding as described in claim 9.
11. A non-transitory computer-readable storage medium, on which computer-executable instructions are stored. When the computer-executable instructions are loaded into an SBC codec in a wireless device with a Bluetooth audio transmission function, the SBC codec executes the method for the sampling rate supported by the extended SBC encoding and decoding as described in any one of claims 1-8.
Citation Information
Patent Citations
An encoding method of audio data SBC algorithm and Bluetooth stereo subsystem
CN101217038A
Audio bandwidth expansion method and system based on deep learning, and coding method
CN115346549A