Audio encoding method and audio encoding device
By filtering the tonal components of the high-frequency band signals of the audio signal and multiplexing the bitstream of the encoding parameters, the problem of how to improve the encoding quality of the audio signal is solved, and efficient encoding effect under limited bandwidth is achieved.
Patent Information
- Application Number
- CN202010480931.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-05-30
- Publication Date
- 2024-10-29
- Estimated Expiration
- 2040-05-30
AI Technical Summary
How to improve the encoding quality of audio signals in order to better utilize limited bandwidth for audio signal transmission.
By filtering the tone components of high-frequency band signals, information about the target tone components is obtained, and their encoding parameters are multiplexed to generate an encoded bitstream, thereby improving encoding efficiency.
To improve the encoding quality and enhance the encoding effect of audio signals with a limited number of encoding bits.
Smart Images

Figure CN113808597B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of audio signal encoding, and in particular to an audio encoding method and an audio encoding device. Background Art
[0002] As the quality of life improves, people's demand for high-quality audio continues to increase. In order to better transmit audio signals using limited bandwidth, it is necessary to encode the audio signal first, and then transmit the encoded bit stream to the decoder. The decoder decodes the received bit stream to obtain the decoded audio signal, which is used for playback.
[0003] Among them, how to improve the encoding quality of audio signals has become a technical problem that needs to be solved urgently. Summary of the invention
[0004] The embodiments of the present application provide an audio encoding method and an audio encoding device for improving the encoding quality of an audio signal.
[0005] To solve the above technical problems, the present application provides the following technical solutions:
[0006] In the first aspect, the embodiment of the present application provides an audio encoding method, comprising: obtaining a current frame of an audio signal, the current frame comprising a high-frequency band signal; encoding the high-frequency band signal to obtain encoding parameters of the current frame, the encoding comprising: tone component screening; the encoding parameters are used to represent information of a target tone component of the high-frequency band signal, the target tone component is obtained after the tone component screening, and the tone component information comprises position information, quantity information, and amplitude information or energy information of the tone component; the encoding parameters are multiplexed to obtain an encoded bitstream. In the embodiment of the present application, the high-frequency band signal is encoded to obtain encoding parameters of the current frame, the encoding comprises tone component screening, the encoding parameters are used to represent the target tone component obtained after the tone component screening, the encoding parameters can obtain an encoded bitstream through bitstream multiplexing, the information of the target tone component carried in the encoded bitstream obtained by the embodiment of the present application is filtered by the tone component, so that a limited number of encoding bits can be efficiently used to obtain a better tone component encoding effect, thereby improving the encoding quality of the audio signal.
[0007] In a possible implementation, the high frequency band corresponding to the high frequency band signal includes at least one frequency region, and the at least one frequency region includes the current frequency region; the encoding of the high frequency band signal to obtain the encoding parameters of the current frame includes: obtaining information of candidate tone components of the current frequency region according to the high frequency band signal of the current frequency region; performing tone component screening on the information of the candidate tone components of the current frequency region to obtain information of target tone components of the current frequency region; obtaining encoding parameters of the current frequency region according to the information of the target tone components of the current frequency region. In the above scheme, the encoding process in the embodiment of the present application includes tone component screening for the information of candidate tone components, and the encoding parameters are used to represent the target tone components obtained after the tone component screening. The encoding parameters can obtain the encoded bitstream through bitstream multiplexing. The information of the target tone components carried in the encoded bitstream obtained in the embodiment of the present application is filtered by the tone components, so the limited number of encoding bits can be efficiently used to obtain a better tone component encoding effect, thereby improving the encoding quality of the audio signal.
[0008] In a possible implementation, the high frequency band corresponding to the high frequency band signal includes at least one frequency region, and the at least one frequency region includes the current frequency region; encoding the high frequency band signal to obtain the encoding parameters of the current frame includes: performing peak search according to the high frequency band signal of the current frequency region to obtain peak information of the current frequency region, and the peak information of the current frequency region includes: peak quantity information, peak position information, and peak energy information or peak amplitude information of the current frequency region; performing peak screening on the peak information of the current frequency region to obtain information of candidate tone components of the current frequency region; performing tone component screening on the information of candidate tone components of the current frequency region to obtain information of target tone components of the current frequency region; and obtaining the encoding parameters of the current frequency region according to the information of the target tone components of the current frequency region. In the above scheme, the encoding process includes peak screening for peak information of the current frequency region and tone component screening for information of candidate tone components. The encoding parameters are used to represent the target tone components obtained after tone component screening. The encoding parameters can obtain the encoded bitstream through bitstream multiplexing. The information of the target tone component carried in the encoded bitstream obtained in the embodiment of the present application is filtered by the tone component. Therefore, the limited number of encoding bits can be efficiently utilized to obtain better tone component encoding effect and improve the encoding quality of the audio signal.
[0009] In a possible implementation, the current frequency region includes at least one sub-band; the tone component screening of the information of the candidate tone components of the current frequency region to obtain the information of the target tone components of the current frequency region includes: merging the candidate tone components with the same sub-band sequence number in the current frequency region to obtain the information of the candidate tone components after merging in the current frequency region; obtaining the information of the target tone components of the current frequency region according to the information of the candidate tone components after merging in the current frequency region. In the above scheme, the audio encoding device can obtain the sub-band sequence numbers corresponding to all candidate tone components in the current frequency region, and merge two or more candidate tone components with the same sub-band sequence number in the current frequency region. After completing the merging process for the current frequency region, the information of the candidate tone components after merging is obtained. The information of the target tone components carried in the coded bit stream obtained in the embodiment of the present application is merged, so the limited number of coding bits can be efficiently used to obtain a better tone component coding effect, thereby improving the coding quality of the audio signal.
[0010] In a possible implementation, the at least one subband includes the current subband; the information of the candidate tone components after the merging process of the current frequency region includes: the position information of the candidate tone components after the merging process of the current subband, the amplitude information or energy information of the candidate tone components after the merging process of the current subband; the position information of the candidate tone components after the merging process of the current subband includes: the position information of one of the candidate tone components before the merging process of the current subband; the amplitude information or energy information of the candidate tone components after the merging process of the current subband includes: the amplitude information or energy information of the one candidate tone component, or the amplitude information or energy information of the candidate tone components after the merging process of the current subband is calculated based on the amplitude information or energy information of the candidate tone components before the merging process of the current subband. In the above scheme, after the merging process, the information of the candidate tone components after the merging process of the current subband can be obtained through the information of the candidate tone components of the current subband.
[0011] In a possible implementation, the information of the candidate tone components after the merging process of the current frequency region further includes: the number information of the candidate tone components after the merging process of the current frequency region; the number information of the candidate tone components after the merging process of the current frequency region is the same as the number information of the sub-bands having the candidate tone components in the current frequency region. In the above scheme, the sub-band having the candidate tone components in the current frequency region refers to the sub-band containing the candidate tone components before the merging process in the current frequency region. In the embodiment of the present application, after the merging process, the information of the candidate tone components after the merging process of the current frequency region can be obtained according to the information of the candidate tone components in the current frequency region.
[0012] In a possible implementation, before the candidate tone components with the same sub-band number in the current frequency region are merged, the method further includes: arranging the candidate tone components in the current frequency region in ascending or descending positions according to the position information of the candidate tone components in the current frequency region to obtain the candidate tone components after the position arrangement in the current frequency region; the merging of the candidate tone components with the same sub-band number in the current frequency region includes: merging the candidate tone components with the same sub-band number in the current frequency region according to the candidate tone components after the position arrangement in the current frequency region. In the above scheme, the merging process can be arranging the candidate tone components in ascending or descending positions according to the position information according to the position information of the candidate tone components in the current frequency region; for the candidate tone components arranged in ascending or descending positions according to the position information, calculating the sub-band numbers corresponding to the two candidate tone components with adjacent position information; if the sub-band numbers corresponding to the two candidate tone components with adjacent positions are the same, merging the two candidate tone components to obtain the quantity information, position information and energy or amplitude information of the merged candidate tone components in the current frequency region. In the embodiment of the present application, the candidate tone components in the current frequency region are arranged in ascending or descending positions, so that the candidate tone components arranged in the current frequency region can be obtained. The candidate tone components arranged in the current frequency region are used for merging processing, which can improve the efficiency of the merging processing.
[0013] In a possible implementation, the information of the target tone component of the current frequency region is obtained according to the information of the candidate tone components after the merging process of the current frequency region, including: obtaining the information of the target tone component of the current frequency region according to the information of the candidate tone components after the merging process of the current frequency region and the information of the maximum number of tone components that can be encoded in the current frequency region. In the above scheme, after the information of the candidate tone components after the merging process and the information of the maximum number of tone components that can be encoded in the current frequency region are performed quantity screening, the information of the candidate tone components after the quantity screening of the current frequency region is the information of the target tone component of the current frequency region. In the embodiment of the present application, the audio encoding device performs quantity screening on the information of the candidate tone components after the merging process according to the information of the maximum number of tone components that can be encoded in the current frequency region, so as to obtain the information of the candidate tone components after the quantity screening of the current frequency region. Through the quantity screening process, the number of candidate tone components in the current frequency region can be reduced, thereby improving the encoding efficiency of the audio signal.
[0014] In a possible implementation, the information of the target tone component of the current frequency region is obtained according to the information of the candidate tone components after the merging process of the current frequency region and the information of the maximum number of tone components that can be encoded in the current frequency region, including: arranging the candidate tone components after the merging process of the current frequency region according to the energy information or amplitude information to obtain the information of the candidate tone components after the energy information or amplitude information is arranged; obtaining the information of the target tone component of the current frequency region according to the information of the candidate tone components after the energy information or amplitude information is arranged and the information of the maximum number of tone components that can be encoded in the current frequency region. In the above scheme, after arranging the candidate tone components in ascending or descending order according to the position information, the information of the candidate tone components after the energy information or amplitude information is screened for quantity, the information of the maximum number of tone components that can be encoded in the current frequency region refers to the maximum number of tone components that can be used for encoding in the current frequency region, and the information of the maximum number of tone components that can be encoded in the current frequency region can be set to a preset second value, or selected according to the coding rate. Information on candidate tone components after quantity screening in the current frequency region can be obtained. Through quantity screening processing, the number of candidate tone components in the current frequency region can be reduced, thereby improving the encoding efficiency of the audio signal.
[0015] In a possible implementation, the step of obtaining the information of the target tone components of the current frequency region based on the information of the candidate tone components after the merging process of the current frequency region includes: obtaining the information of the candidate tone components after quantity screening of the current frequency region based on the information of the candidate tone components after the merging process of the current frequency region and the information of the maximum number of tone components that can be encoded in the current frequency region; obtaining the information of the target tone components of the current frequency region based on the information of the candidate tone components after quantity screening of the current frequency region. In the above scheme, the audio encoding device performs quantity screening processing on the information of the candidate tone components after the merging process based on the information of the maximum number of tone components that can be encoded in the current frequency region, so as to obtain the information of the candidate tone components after quantity screening of the current frequency region. Through the quantity screening processing, the number of candidate tone components in the current frequency region can be reduced, thereby improving the encoding efficiency of the audio signal.
[0016] In a possible implementation, the information of the candidate tone components after the merging process of the current frequency region and the maximum number of tone components that can be encoded in the current frequency region are obtained according to the information of the candidate tone components after the merging process of the current frequency region, and the information of the maximum number of tone components that can be encoded in the current frequency region, including: arranging the candidate tone components after the merging process of the current frequency region according to the energy information or amplitude information to obtain the information of the candidate tone components after the energy information or amplitude information is arranged; obtaining the information of the candidate tone components after the merging process of the current frequency region of the current frame according to the information of the candidate tone components after the energy information or amplitude information is arranged and the maximum number of tone components that can be encoded in the current frequency region. In the above scheme, the audio encoding device can perform a quantity screening process on the information of the candidate tone components after the energy information or amplitude information is arranged, and when performing the quantity screening process, it is also necessary to obtain the maximum number of tone components that can be encoded in the current frequency region. The maximum number of tone components that can be encoded in the current frequency region refers to the maximum number of tone components that can be used for encoding in the current frequency region. The maximum number of tone components that can be encoded in the current frequency region can be set to a preset second value, or selected according to the encoding rate.
[0017] In a possible implementation, the information of the target tone components of the current frequency region is obtained according to the information of the candidate tone components filtered by the number of the current frequency region, including: arranging the candidate tone components filtered by the number of the current frequency region of the current frame in ascending or descending positions according to the position information of the candidate tone components filtered by the number of the current frequency region of the current frame, so as to obtain the candidate tone components arranged in the positions filtered by the number of the current frequency region of the current frame; obtaining the subband sequence number corresponding to the candidate tone components sorted in the positions filtered by the number of the current frequency region of the current frame according to the candidate tone components arranged in the positions filtered by the number of the current frequency region of the current frame; obtaining the subband sequence number corresponding to the candidate tone components sorted in the positions filtered by the number of the current frequency region of the previous frame of the current frame. band sequence number; if the position information of the nth candidate tone component after the position sorting after the number of current frequency areas of the current frame is filtered and the position information of the nth candidate tone component after the number of current frequency areas of the previous frame is filtered and the subband sequence number corresponding to the nth candidate tone component after the number of current frequency areas of the current frame is filtered and the subband sequence number corresponding to the nth candidate tone component after the number of current frequency areas of the previous frame is filtered and the subband sequence number is different, then the position information of the nth candidate tone component after the position sorting after the number of current frequency areas of the current frame is corrected to obtain the information of the target tone component of the current frequency area, and the nth candidate tone component is any candidate tone component after the position sorting after the number of current frequency areas is filtered and the subband sequence number corresponding to the nth candidate tone component after the number of current frequency areas of the previous frame is different. In the above scheme, after performing inter-frame continuity correction processing, the audio encoding device can obtain the information of the target tone component in the current frequency area. Through the above-mentioned inter-frame continuity correction processing, the continuity of the tone component between adjacent frames and the sub-band distribution of the tone component are taken into consideration, and the limited number of coding bits is efficiently utilized to obtain a better tone component coding effect, thereby improving the coding quality.
[0018] In one possible implementation, the preset condition includes: the difference between the position information of the nth candidate tone component after position sorting after the number of current frequency regions of the current frame is screened and the position information of the nth candidate tone component after position sorting after the number of current frequency regions of the previous frame is screened is less than or equal to a preset threshold. In the above scheme, the value of the preset threshold is not limited. There are multiple implementation methods for setting the preset condition in the embodiment of the present application. The above example is only an optional scheme. Other preset conditions can also be set based on the above preset conditions, such as the ratio between the position information of the nth candidate tone component in the current frequency region of the current frame and the position information of the nth candidate tone component in the current frequency region of the previous frame is less than or equal to another preset threshold. There is no limitation on the value of the other preset threshold.
[0019] In a possible implementation, the position information of the nth candidate tone component after the position sorting after the number of the current frequency region of the current frame is corrected, including: correcting the position information of the nth candidate tone component after the number of the current frequency region of the current frame after the number of the current frequency region is corrected to the position information of the nth candidate tone component after the number of the current frequency region of the previous frame after the number of the current frequency region is corrected. In the above scheme, the position information of the nth candidate tone component of the current frame in the frequency region is corrected, specifically, the position information of the nth candidate tone component in the current frequency region of the current frame can be corrected to be the same as the nth candidate tone component in the current frequency region of the previous frame. According to the corrected number information, position information and energy or amplitude information of the candidate tone components, the number information, position information and amplitude or energy information of the target tone component in the current frequency region are determined. Through the above inter-frame continuity correction processing, the continuity of the tone components between adjacent frames and the sub-band distribution of the tone components are taken into account, and the limited number of coding bits is efficiently used to obtain a better tone component coding effect, thereby improving the coding quality.
[0020] In a possible implementation, the current frequency region includes at least one sub-band; the tone component screening of the information of the candidate tone components of the current frequency region to obtain the information of the target tone components of the current frequency region includes: merging the candidate tone components with the same sub-band number in the current frequency region to obtain the information of the target tone components of the current frequency region. In the above scheme, the audio encoding device can obtain the sub-band numbers corresponding to all candidate tone components in the current frequency region, and merge the candidate tone components with the same sub-band number in the current frequency region. For example, if the sub-band numbers of two candidate tone components in the current frequency region are the same, the two candidate tone components can be merged into one merged candidate tone component in the current frequency region. After completing the merging process for the current frequency region, the information of the target tone component of the current frequency region is obtained. The information of the target tone component carried in the coded bit stream obtained in the embodiment of the present application is merged, so the limited number of coding bits can be efficiently used to obtain a better tone component coding effect and improve the coding quality of the audio signal.
[0021] In a possible implementation, the current frequency region includes at least one subband, and the tone component screening of the information of the candidate tone components in the current frequency region to obtain the information of the target tone components in the current frequency region includes: obtaining the subband sequence number corresponding to the candidate tone components in the current frequency region of the current frame according to the position information of the candidate tone components in the current frequency region of the current frame; obtaining the subband sequence number corresponding to the candidate tone components in the current frequency region of the previous frame of the current frame; if the position information of the nth candidate tone component in the current frequency region of the current frame and the position information of the nth candidate tone component in the current frequency region of the previous frame meet a preset condition, and the subband sequence number corresponding to the nth candidate tone component in the current frequency region of the current frame and the subband sequence number corresponding to the nth candidate tone component in the current frequency region of the previous frame are different, the position information of the nth candidate tone component in the current frequency region of the current frame is corrected to obtain the information of the target tone component in the current frequency region, and the nth candidate tone component is any one of the candidate tone components in the current frequency region. In the above scheme, through the above-mentioned inter-frame continuity correction processing, the continuity of the tone components between adjacent frames and the sub-band distribution of the tone components are considered, and the limited number of coding bits is efficiently used to obtain a better tone component coding effect, thereby improving the coding quality.
[0022] In a possible implementation, the method of obtaining the subband serial number corresponding to the candidate tone components in the current frequency region of the current frame according to the position information of the candidate tone components in the current frequency region of the current frame includes: arranging the candidate tone components in the current frequency region of the current frame in ascending or descending positions according to the position information of the candidate tone components in the current frequency region of the current frame to obtain the arranged candidate tone components in the current frequency region of the current frame; obtaining the subband serial number corresponding to the candidate tone components in the current frequency region of the current frame according to the arranged candidate tone components in the current frequency region. In the above scheme, the arranged candidate tone components in the current frequency region are arranged in ascending or descending positions, so as to obtain the arranged candidate tone components in the current frequency region, and the efficiency of the arranged candidate tone components in the current frequency region is improved by using the arranged candidate tone components in the current frequency region to perform inter-frame continuity correction processing.
[0023] In one possible implementation, the preset condition includes: the difference between the position information of the nth candidate tone component in the current frequency region of the current frame and the position information of the nth candidate tone component in the current frequency region of the previous frame is less than or equal to a preset threshold. In the above scheme, the value of the preset threshold is not limited. There are multiple implementation methods for setting the preset condition in the embodiment of the present application. The above example is only an optional scheme. Other preset conditions can also be set based on the above preset conditions, such as the ratio between the position information of the nth candidate tone component in the current frequency region of the current frame and the position information of the nth candidate tone component in the current frequency region of the previous frame is less than or equal to another preset threshold. There is no limitation on the value of the other preset threshold.
[0024] In a possible implementation, the position information of the nth candidate tone component in the current frequency region of the current frame is corrected, including: correcting the position information of the nth candidate tone component in the current frequency region of the current frame to the position information of the nth candidate tone component in the current frequency region of the previous frame. In the above scheme, the position information of the nth candidate tone component in the current frequency region of the current frame is corrected, specifically, the position information of the nth candidate tone component in the current frequency region of the current frame can be corrected to be the same as the nth candidate tone component in the current frequency region of the previous frame. According to the quantity information, position information and energy or amplitude information of the corrected candidate tone components, the quantity information, position information and amplitude or energy information of the target tone component in the current frequency region are determined. Through the above-mentioned inter-frame continuity correction processing, the continuity of the tone components between adjacent frames and the sub-band distribution of the tone components are taken into account, and the limited number of coding bits is efficiently used to obtain a better tone component coding effect, thereby improving the coding quality.
[0025] In a possible implementation, the tone component screening of the candidate tone component information of the current frequency region to obtain the target tone component information of the current frequency region includes: obtaining the target tone component information of the current frequency region based on the candidate tone component information of the current frequency region and the maximum number of tone components that can be encoded in the current frequency region. In the above scheme, the audio encoding device performs a quantity screening process on the merged candidate tone component information based on the maximum number of tone components that can be encoded in the current frequency region, thereby obtaining the candidate tone component information after quantity screening of the current frequency region. Through the quantity screening process, the number of candidate tone components in the current frequency region can be reduced, thereby improving the encoding efficiency of the audio signal.
[0026] In a possible implementation, the information of the target tone component of the current frequency region is obtained according to the information of the candidate tone components of the current frequency region and the information of the maximum number of tone components that can be encoded in the current frequency region, including: selecting the X candidate tone components with the largest energy information or amplitude information of the candidate tone components in the current frequency region according to the information of the maximum number of tone components that can be encoded in the current frequency region, wherein X is less than or equal to the maximum number of tone components that can be encoded in the current frequency region, and X is a positive integer; determining the information of the X candidate tone components as the information of the target tone components of the current frequency region, wherein X represents the number of target tone components of the current frequency region. In the above scheme, the frequency encoding device can directly use the information of the X candidate tone components as the information of the target tone components of the current frequency region, wherein X represents the number of target tone components of the current frequency region. Alternatively, the information of the target tone components of the current frequency region is further determined according to the information of the X candidate tone components. For example, the information of the X candidate tone components is subjected to inter-frame continuity correction processing, and the corrected information of the X candidate tone components is used as the information of the target tone components of the current frequency region. Alternatively, the energy information or amplitude information of the X candidate tone components is weighted and adjusted, and the information of the X candidate tone components after the weighted adjustment is used as the information of the target tone component in the current frequency region.
[0027] In one possible implementation, the information of the candidate tone component includes: amplitude information or energy information of the candidate tone component, and the amplitude information or energy information of the candidate tone component includes: power spectrum ratio of the candidate tone component, wherein the power spectrum ratio of the candidate tone component is the ratio of the value of the power spectrum of the candidate tone component to the average value of the power spectrum of the current frequency region.
[0028] In the second aspect, the embodiment of the present application also provides an audio encoding device, the device comprising: an acquisition module, for acquiring a current frame of an audio signal, the current frame comprising a high-frequency band signal; an encoding module, for encoding the high-frequency band signal to obtain encoding parameters of the current frame, the encoding comprising: tone component screening; the encoding parameters are used to represent information of a target tone component of the high-frequency band signal, the target tone component is obtained after the tone component screening, and the tone component information comprises position information, quantity information, and amplitude information or energy information of the tone component; a code stream multiplexing module, for code stream multiplexing the encoding parameters to obtain an encoding code stream. In the embodiment of the present application, the high-frequency band signal is encoded to obtain encoding parameters of the current frame, the encoding comprises tone component screening, the encoding parameters are used to represent the target tone component obtained after the tone component screening, the encoding parameters can obtain an encoding code stream through code stream multiplexing, the information of the target tone component carried in the encoding code stream obtained by the embodiment of the present application is filtered by the tone component, so that a limited number of encoding bits can be efficiently used to obtain a better tone component encoding effect, thereby improving the encoding quality of the audio signal.
[0029] In a possible implementation, the high frequency band corresponding to the high frequency band signal includes at least one frequency region, and the at least one frequency region includes the current frequency region; the encoding module is used to obtain information on candidate tone components of the current frequency region based on the high frequency band signal of the current frequency region; perform tone component screening on the information on candidate tone components of the current frequency region to obtain information on target tone components of the current frequency region; and obtain encoding parameters of the current frequency region based on the information on the target tone components of the current frequency region.
[0030] In a possible implementation, the high frequency band corresponding to the high frequency band signal includes at least one frequency region, and the at least one frequency region includes the current frequency region; the encoding module is used to perform peak search based on the high frequency band signal of the current frequency region to obtain peak information of the current frequency region, and the peak information of the current frequency region includes: peak quantity information, peak position information, and peak energy information or peak amplitude information of the current frequency region; perform peak screening on the peak information of the current frequency region to obtain information on candidate tonal components of the current frequency region; perform tonal component screening on the information on candidate tonal components of the current frequency region to obtain information on target tonal components of the current frequency region; and obtain encoding parameters of the current frequency region based on the information on the target tonal components of the current frequency region.
[0031] In one possible implementation, the current frequency region includes at least one subband; the encoding module is used to merge candidate tone components with the same subband number in the current frequency region to obtain information about the merged candidate tone components of the current frequency region; and obtain information about the target tone components of the current frequency region based on the information about the merged candidate tone components of the current frequency region.
[0032] In one possible implementation, the at least one subband includes the current subband; the information of the candidate tone components after the merging process of the current frequency region includes: the position information of the candidate tone components after the merging process of the current subband, and the amplitude information or energy information of the candidate tone components after the merging process of the current subband; the position information of the candidate tone components after the merging process of the current subband includes: the position information of one candidate tone component among the candidate tone components before the merging process of the current subband; the amplitude information or energy information of the candidate tone components after the merging process of the current subband includes: the amplitude information or energy information of the one candidate tone component, or the amplitude information or energy information of the candidate tone components after the merging process of the current subband is calculated based on the amplitude information or energy information of the candidate tone components before the merging process of the current subband.
[0033] In a possible implementation, the information of the candidate tone components after the merging process of the current frequency region further includes: information on the number of the candidate tone components after the merging process of the current frequency region; the information on the number of the candidate tone components after the merging process of the current frequency region is the same as the information on the number of sub-bands having the candidate tone components in the current frequency region.
[0034] In one possible implementation, the encoding module is used to arrange the candidate tone components in the current frequency region in ascending or descending positions according to position information of the candidate tone components in the current frequency region before merging the candidate tone components with the same subband number in the current frequency region to obtain the arranged candidate tone components in the current frequency region; the encoding module is used to merge the candidate tone components with the same subband number in the current frequency region according to the arranged candidate tone components in the current frequency region.
[0035] In a possible implementation, the encoding module is used to obtain information about target tone components in the current frequency region based on information about candidate tone components after merging processing in the current frequency region and information about a maximum number of tone components that can be encoded in the current frequency region.
[0036] In one possible implementation, the encoding module is used to arrange the candidate tone components after merging the current frequency region according to energy information or amplitude information to obtain information about the candidate tone components after arrangement with energy information or amplitude information; and obtain information about the target tone components in the current frequency region according to the information about the candidate tone components after arrangement with energy information or amplitude information and information about the maximum number of tone components that can be encoded in the current frequency region.
[0037] In a possible implementation, the encoding module is used to obtain information about candidate tone components after quantity screening in the current frequency region based on information about candidate tone components after merging processing in the current frequency region and information about the maximum number of tone components that can be encoded in the current frequency region; and obtain information about target tone components in the current frequency region based on information about candidate tone components after quantity screening in the current frequency region.
[0038] In one possible implementation, the encoding module is used to arrange the candidate tone components after the merger processing of the current frequency region according to energy information or amplitude information to obtain information of the candidate tone components after arrangement with energy information or amplitude information; and obtain information of the candidate tone components after the number of screening of the current frequency region of the current frame according to the information of the candidate tone components after arrangement with energy information or amplitude information and the information of the maximum number of tone components that can be encoded in the current frequency region.
[0039] In a possible implementation, the encoding module is used to arrange the candidate tone components after the number of current frequency regions of the current frame is filtered in ascending or descending positions according to the position information of the candidate tone components after the number of current frequency regions of the current frame is filtered, so as to obtain the candidate tone components arranged in the positions after the number of current frequency regions of the current frame is filtered; obtain the subband sequence numbers corresponding to the candidate tone components arranged in the positions after the number of current frequency regions of the current frame according to the candidate tone components arranged in the positions after the number of current frequency regions of the current frame; obtain the subband sequence numbers corresponding to the candidate tone components arranged in the positions after the number of current frequency regions of the previous frame of the current frame; if the number of current frequency regions of the current frame is filtered If the position information of the nth candidate tone component after the position sorting after the number screening of the current frequency area of the previous frame meets the preset conditions, and the subband sequence number corresponding to the nth candidate tone component after the position sorting after the number screening of the current frequency area of the current frame is different from the subband sequence number corresponding to the nth candidate tone component after the position sorting after the number screening of the current frequency area of the previous frame, then the position information of the nth candidate tone component after the position sorting after the number screening of the current frequency area of the current frame is corrected to obtain the information of the target tone component of the current frequency area, and the nth candidate tone component is any candidate tone component after the position sorting after the number screening in the current frequency area.
[0040] In one possible implementation, the preset condition includes: the difference between the position information of the nth candidate tone component after position sorting after the number of current frequency regions of the current frame is filtered and the position information of the nth candidate tone component after position sorting after the number of current frequency regions of the previous frame is filtered is less than or equal to a preset threshold.
[0041] In a possible implementation, the encoding module is used to correct the position information of the nth candidate tone component after the position is sorted after the number of current frequency regions of the current frame is screened to the position information of the nth candidate tone component after the position is sorted after the number of current frequency regions of the previous frame is screened.
[0042] In a possible implementation, the current frequency region includes at least one sub-band; the encoding module is used to merge candidate tone components with the same sub-band sequence number in the current frequency region to obtain information on target tone components in the current frequency region.
[0043] In a possible implementation, the current frequency region includes at least one subband, and the encoding module is used to obtain the subband sequence number corresponding to the candidate tone component in the current frequency region of the current frame according to the position information of the candidate tone component in the current frequency region of the current frame; obtain the subband sequence number corresponding to the candidate tone component in the current frequency region of the previous frame of the current frame; if the position information of the nth candidate tone component in the current frequency region of the current frame and the position information of the nth candidate tone component in the current frequency region of the previous frame meet a preset condition, and the subband sequence number corresponding to the nth candidate tone component in the current frequency region of the current frame and the subband sequence number corresponding to the nth candidate tone component in the current frequency region of the previous frame are different, then the position information of the nth candidate tone component in the current frequency region of the current frame is corrected to obtain the information of the target tone component in the current frequency region, and the nth candidate tone component is any one of the candidate tone components in the current frequency region.
[0044] In a possible implementation, the encoding module is used to arrange the candidate tone components in the current frequency region of the current frame in ascending or descending positions according to the position information of the candidate tone components in the current frequency region of the current frame to obtain the arranged candidate tone components in the current frequency region of the current frame; and obtain the subband sequence number corresponding to the candidate tone components in the current frequency region of the current frame according to the arranged candidate tone components in the current frequency region.
[0045] In one possible implementation, the preset condition includes: a difference between position information of the nth candidate tone component in the current frequency region of the current frame and position information of the nth candidate tone component in the current frequency region of the previous frame is less than or equal to a preset threshold.
[0046] In a possible implementation, the encoding module is used to correct the position information of the nth candidate tone component in the current frequency region of the current frame to the position information of the nth candidate tone component in the current frequency region of the previous frame.
[0047] In a possible implementation, the encoding module is used to obtain information about target tone components in the current frequency region based on information about candidate tone components in the current frequency region and information about a maximum number of tone components that can be encoded in the current frequency region.
[0048] In a possible implementation, the encoding module is used to select X candidate tone components with the largest energy information or amplitude information among the candidate tone components in the current frequency region based on the information on the maximum number of tone components that can be encoded in the current frequency region, where X is less than or equal to the maximum number of tone components that can be encoded in the current frequency region, and X is a positive integer; and determine that the information of the X candidate tone components is the information of the target tone components of the current frequency region, where X represents the number of target tone components in the current frequency region.
[0049] In one possible implementation, the information of the candidate tone component includes: amplitude information or energy information of the candidate tone component, and the amplitude information or energy information of the candidate tone component includes: power spectrum ratio of the candidate tone component, wherein the power spectrum ratio of the candidate tone component is the ratio of the value of the power spectrum of the candidate tone component to the average value of the power spectrum of the current frequency region.
[0050] In the second aspect of the present application, the constituent modules of the audio encoding device may also execute the steps described in the aforementioned first aspect and various possible implementations. For details, please refer to the aforementioned description of the first aspect and various possible implementations.
[0051] In a third aspect, an embodiment of the present application provides an audio encoding device, comprising: a non-volatile memory and a processor coupled to each other, wherein the processor calls a program code stored in the memory to perform a method as described in any one of the above-mentioned first aspects.
[0052] In a fourth aspect, an embodiment of the present application provides an audio encoding device, comprising: an encoder, wherein the encoder is used to execute a method as described in any one of the above-mentioned first aspects.
[0053] In a fifth aspect, an embodiment of the present application provides a computer-readable storage medium, comprising a computer program, wherein when the computer program is executed on a computer, the computer executes any one of the methods described in the first aspect.
[0054] In a sixth aspect, an embodiment of the present application provides a computer-readable storage medium, comprising a coded bit stream obtained according to any one of the methods in the first aspect above.
[0055] In a seventh aspect, the present application provides a computer program product, which includes a computer program. When the computer program is executed by a computer, it is used to execute any one of the methods in the first aspect above.
[0056] In an eighth aspect, the present application provides a chip comprising a processor and a memory, wherein the memory is used to store a computer program, and the processor is used to call and run the computer program stored in the memory to execute a method as described in any one of the above-mentioned first aspects. BRIEF DESCRIPTION OF THE DRAWINGS
[0057] Figure 1 A schematic diagram of an example of an audio encoding and decoding system in an embodiment of the present application;
[0058] Figure 2 A schematic diagram of an audio coding application in an embodiment of the present application;
[0059] Figure 3 A schematic diagram of an audio coding application in an embodiment of the present application;
[0060] Figure 4 A flowchart of an audio encoding method according to an embodiment of the present application;
[0061] Figure 5 A flowchart of another audio encoding method according to an embodiment of the present application;
[0062] Figure 6 A flowchart of another audio encoding method according to an embodiment of the present application;
[0063] Figure 7 A flowchart of another audio encoding method according to an embodiment of the present application;
[0064] Figure 8 A flowchart of another audio encoding method according to an embodiment of the present application;
[0065] Fig. 9 A flowchart of an audio decoding method according to an embodiment of the present application;
[0066] Fig.10 A schematic diagram of an audio encoding device according to an embodiment of the present application;
[0067] Fig.11 A schematic diagram of another audio encoding device according to an embodiment of the present application. DETAILED DESCRIPTION
[0068] The embodiments of the present application provide an audio encoding method and an audio encoding device for improving the encoding quality of an audio signal.
[0069] The embodiments of the present application are described below in conjunction with the accompanying drawings.
[0070] The terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and need not be used to describe a specific order or sequential order. It should be understood that the terms used in this way can be interchangeable under appropriate circumstances, which is only to describe the distinction mode adopted by the objects of the same attributes when describing in the embodiments of the present application. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, so that the process, method, system, product or equipment comprising a series of units need not be limited to those units, but may include other units that are not clearly listed or inherent to these processes, methods, products or equipment.
[0071] It should be understood that in the present application, "at least one (item)" means one or more, and "plurality" means two or more. "And / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the objects associated before and after are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single, multiple, or partly single and partly multiple.
[0072] The following describes the system architecture used in the embodiments of the present application. Figure 1 , Figure 1 A schematic block diagram of an audio encoding and decoding system 10 used in an embodiment of the present application is given as an example. Figure 1As shown, the audio encoding and decoding system 10 may include a source device 12 and a destination device 14, the source device 12 generating encoded audio data, and therefore, the source device 12 may be referred to as an audio encoding device. The destination device 14 may decode the encoded audio data generated by the source device 12, and therefore, the destination device 14 may be referred to as an audio decoding device. Various implementations of the source device 12, the destination device 14, or both may include one or more processors and a memory coupled to the one or more processors. The memory may include, but is not limited to, a random access memory (RAM), a read only memory (ROM), an electrically erasable programmable read only memory (EEPROM), a flash memory, or any other medium that can be used to store desired program code in the form of instructions or data structures that can be accessed by a computer, as described herein. Source device 12 and destination device 14 may include a variety of devices, including desktop computers, mobile computing devices, notebook (e.g., laptop) computers, tablet computers, set-top boxes, telephone handsets such as so-called "smart" phones, televisions, speakers, digital media players, video game consoles, in-vehicle computers, wireless communication devices, or the like.
[0073] Although Figure 1 The source device 12 and the destination device 14 are depicted as separate devices, but device embodiments may also include both the source device 12 and the destination device 14 or the functionality of both, i.e., the source device 12 or the corresponding functionality and the destination device 14 or the corresponding functionality. In such embodiments, the source device 12 or the corresponding functionality and the destination device 14 or the corresponding functionality may be implemented using the same hardware and / or software, or using separate hardware and / or software, or any combination thereof.
[0074] The source device 12 and the destination device 14 may be connected in communication via a link 13, and the destination device 14 may receive the encoded audio data from the source device 12 via the link 13. The link 13 may include one or more media or devices capable of moving the encoded audio data from the source device 12 to the destination device 14. In one example, the link 13 may include one or more communication media that enable the source device 12 to transmit the encoded audio data directly to the destination device 14 in real time. In this example, the source device 12 may modulate the encoded audio data according to a communication standard (e.g., a wireless communication protocol), and may transmit the modulated audio data to the destination device 14. The one or more communication media may include wireless and / or wired communication media, such as a radio frequency (RF) spectrum or one or more physical transmission lines. The one or more communication media may form part of a packet-based network, such as a local area network, a wide area network, or a global network (e.g., the Internet). The one or more communication media may include routers, switches, base stations, or other devices that facilitate communication from the source device 12 to the destination device 14.
[0075] The source device 12 includes an encoder 20. Optionally, the source device 12 may also include an audio source 16, a preprocessor 18, and a communication interface 22. In a specific implementation, the encoder 20, the audio source 16, the preprocessor 18, and the communication interface 22 may be hardware components in the source device 12, or may be software programs in the source device 12. They are described as follows:
[0076] The audio source 16 may include or may be any type of sound capture device, for example, for capturing real-world sounds, and / or any type of audio generation device. The audio source 16 may be a microphone for capturing sounds or a memory for storing audio data, and the audio source 16 may also include any type of (internal or external) interface for storing previously captured or generated audio data and / or acquiring or receiving audio data. When the audio source 16 is a microphone, the audio source 16 may be, for example, a local or integrated microphone integrated in the source device; when the audio source 16 is a memory, the audio source 16 may be, for example, a local or integrated memory integrated in the source device. When the audio source 16 includes an interface, the interface may be, for example, an external interface for receiving audio data from an external audio source, and the external audio source may be, for example, an external sound capture device, such as a microphone, an external memory, or an external audio generation device. The interface may be any type of interface according to any proprietary or standardized interface protocol, such as a wired or wireless interface, an optical interface.
[0077] In the embodiment of the present application, the audio data transmitted from the audio source 16 to the pre-processor 18 may also be referred to as original audio data 17 .
[0078] The preprocessor 18 is used to receive the original audio data 17 and perform preprocessing on the original audio data 17 to obtain preprocessed audio 19 or preprocessed audio data 19. For example, the preprocessing performed by the preprocessor 18 may include filtering or denoising.
[0079] The encoder 20 (or audio encoder 20) is used to receive the pre-processed audio data 19 and to execute the various embodiments described below to implement the application of the audio encoding method described in this application on the encoding side.
[0080] The communication interface 22 can be used to receive the encoded audio data 21 and transmit the encoded audio data 21 to the destination device 14 or any other device (such as a memory) through the link 13 for storage or direct reconstruction. The other device can be any device for decoding or storage. The communication interface 22 can, for example, be used to encapsulate the encoded audio data 21 into a suitable format, such as a data packet, for transmission on the link 13.
[0081] The destination device 14 includes a decoder 30. Optionally, the destination device 14 may also include a communication interface 28, an audio post-processor 32, and a speaker device 34. They are described as follows:
[0082] The communication interface 28 can be used to receive the encoded audio data 21 from the source device 12 or any other source, such as a storage device, such as an encoded audio data storage device. The communication interface 28 can be used to transmit or receive the encoded audio data 21 via the link 13 between the source device 12 and the destination device 14 or via any type of network, such as a direct wired or wireless connection, any type of network, such as a wired or wireless network or any combination thereof, or any type of private and public network, or any combination thereof. The communication interface 28 can be used, for example, to decapsulate the data packets transmitted by the communication interface 22 to obtain the encoded audio data 21.
[0083] Both communication interface 28 and communication interface 22 may be configured as unidirectional communication interfaces or bidirectional communication interfaces and may be used, for example, to send and receive messages to establish connections, confirm and exchange any other information related to communication links and / or data transmissions such as encoded audio data transmissions.
[0084] The decoder 30 (or audio decoder 30) is used to receive the encoded audio data 21 and provide decoded audio data 31 or decoded audio 31. In some embodiments, the decoder 30 can be used to execute the various embodiments described below to implement the application of the audio encoding method described in this application on the decoding side.
[0085] The audio post-processor 32 is used to perform post-processing on the decoded audio data 31 (also called reconstructed audio data) to obtain post-processed audio data 33. The post-processing performed by the audio post-processor 32 may include, for example, rendering, or any other processing, and may also be used to transmit the post-processed audio data 33 to a speaker device 34.
[0086] A speaker device 34 is used to receive the post-processed audio data 33 to play the audio to, for example, a user or viewer. The speaker device 34 may be or include any type of speaker for presenting the reconstructed sound.
[0087] Although, Figure 1 The source device 12 and the destination device 14 are depicted as separate devices, but device embodiments may also include both the source device 12 and the destination device 14 or the functionality of both, i.e., the source device 12 or the corresponding functionality and the destination device 14 or the corresponding functionality. In such embodiments, the source device 12 or the corresponding functionality and the destination device 14 or the corresponding functionality may be implemented using the same hardware and / or software, or using separate hardware and / or software, or any combination thereof.
[0088] It is obvious to a person skilled in the art based on the description that the functionality or Figure 1 The presence and (accurate) division of the functionality of the source device 12 and / or destination device 14 shown may vary depending on the actual device and application. The source device 12 and the destination device 14 may include any of a variety of devices, including any type of handheld or stationary device, such as a notebook or laptop computer, a mobile phone, a smart phone, a tablet or tablet computer, a video camera, a desktop computer, a set-top box, a television, a camera, a car device, a stereo, a digital media player, an audio game console, an audio streaming device (such as a content service server or a content distribution server), a broadcast receiver device, a broadcast transmitter device, smart glasses, a smart watch, etc., and may not use or use any type of operating system.
[0089] Both the encoder 20 and the decoder 30 may be implemented as any of a variety of suitable circuits, such as one or more microprocessors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), discrete logic, hardware, or any combination thereof. If the technology is partially implemented in software, the device may store the instructions of the software in a suitable non-transitory computer-readable storage medium, and may use one or more processors to execute the instructions in hardware to perform the technology of the present disclosure. Any of the foregoing (including hardware, software, a combination of hardware and software, etc.) may be considered one or more processors.
[0090] In some cases, Figure 1 The audio encoding and decoding system 10 shown in is only an example, and the technology of the present application can be applied to audio encoding settings (e.g., audio encoding or audio decoding) that do not necessarily include any data communication between encoding and decoding devices. In other examples, data can be retrieved from local storage, streamed on a network, etc. The audio encoding device can encode data and store the data in a memory, and / or the audio decoding device can retrieve data from a memory and decode the data. In some examples, encoding and decoding are performed by devices that do not communicate with each other but only encode data to a memory and / or retrieve data from a memory and decode data.
[0091] The encoder may be a multi-channel encoder, for example, a stereo encoder, a 5.1-channel encoder, or a 7.1-channel encoder, etc. Of course, it is understandable that the encoder may also be a mono encoder.
[0092] The above-mentioned audio data may also be referred to as an audio signal. The audio signal in the embodiment of the present application refers to an input signal in an audio encoding device. The audio signal may include multiple frames. For example, the current frame may specifically refer to a certain frame in the audio signal. The encoding and decoding of the current frame audio signal is used as an example in the embodiment of the present application. The previous frame or the next frame of the current frame in the audio signal can be encoded and decoded accordingly according to the encoding and decoding method of the current frame audio signal. The encoding and decoding process of the previous frame or the next frame of the current frame in the audio signal is no longer described one by one. In addition, the audio signal in the embodiment of the present application may be a monophonic audio signal, or it may be a multi-channel signal, for example, a stereo signal. Among them, the stereo signal may be an original stereo signal, or it may be a stereo signal composed of two signals (left channel signal and right channel signal) included in the multi-channel signal, or it may be a stereo signal composed of two signals generated by at least three signals included in the multi-channel signal, which is not limited in the embodiment of the present application.
[0093] For example, Figure 2 As shown, in this embodiment, the encoder 20 is arranged in the mobile terminal 230, and the decoder 30 is arranged in the mobile terminal 240. The mobile terminal 230 and the mobile terminal 240 are independent electronic devices with audio signal processing capabilities, such as mobile phones, wearable devices, virtual reality (VR) devices, or augmented reality (AR) devices, etc., and the mobile terminal 230 and the mobile terminal 240 are connected via a wireless or wired network.
[0094] Optionally, the mobile terminal 230 may include the audio source 16, the preprocessor 18, the encoder 20 and the channel encoder 232, wherein the audio source 16, the preprocessor 18, the encoder 20 and the channel encoder 232 are connected.
[0095] Optionally, the mobile terminal 240 may include a channel decoder 242, a decoder 30, an audio post-processor 32 and a speaker device 34, wherein the channel decoder 242, the decoder 30, the audio post-processor 32 and the speaker device 34 are connected.
[0096] After the mobile terminal 230 obtains the audio signal through the audio source 16, the audio is preprocessed by the preprocessor 18, and then the audio signal is encoded by the encoder 20 to obtain an encoded code stream; then, the encoded code stream is encoded by the channel encoder 232 to obtain a transmission signal.
[0097] The mobile terminal 230 sends the transmission signal to the mobile terminal 240 via a wireless or wired network.
[0098] After receiving the transmission signal, the mobile terminal 240 decodes the transmission signal through the channel decoder 242 to obtain a coded stream; decodes the coded stream through the decoder 30 to obtain an audio signal; processes the audio signal through the audio post-processor 32, and then plays the audio signal through the speaker device 34. It can be understood that the mobile terminal 230 can also include the various functional modules included in the mobile terminal 240, and the mobile terminal 240 can also include the functional modules included in the mobile terminal 230.
[0099] For example, Figure 3 As shown, the encoder 20 and the decoder 30 are set in a network element 350 with audio signal processing capability in the same core network or wireless network as an example for explanation. The network element 350 can implement transcoding, for example, converting the coded stream of other audio encoders (non-multi-channel encoders) into the coded stream of the multi-channel encoder. The network element 350 can be a media gateway, a transcoding device, or a media resource server of a wireless access network or a core network.
[0100] Optionally, the network element 350 includes a channel decoder 351, other audio decoders 352, an encoder 20 and a channel encoder 353. The channel decoder 351, other audio decoders 352, an encoder 20 and a channel encoder 353 are connected.
[0101] After receiving the transmission signal sent by other devices, the channel decoder 351 decodes the transmission signal to obtain a first coded stream; decodes the first coded stream through the other audio decoder 352 to obtain an audio signal; encodes the audio signal through the encoder 20 to obtain a second coded stream; and encodes the second coded stream through the channel encoder 353 to obtain a transmission signal. That is, the first coded stream is transcoded into the second coded stream.
[0102] The other device may be a mobile terminal with audio signal processing capability; or may be other network elements with audio signal processing capability, which is not limited in this embodiment.
[0103] Optionally, in the embodiment of the present application, the device equipped with the encoder 20 may be referred to as an audio encoding device. In actual implementation, the audio encoding device may also have an audio decoding function, which is not limited in the implementation of the present application.
[0104] Optionally, in the embodiment of the present application, the device equipped with the decoder 30 may be referred to as an audio decoding device. In actual implementation, the audio decoding device may also have an audio encoding function, which is not limited in the implementation of the present application.
[0105] The above-mentioned encoder can execute the audio encoding method of the embodiment of the present application, wherein the first encoding process includes frequency band extension coding, and each frequency point of the high-frequency band signal corresponds to a spectrum retention flag, which indicates whether the spectrum value of a certain frequency point in the high-frequency band signal from before the frequency band extension coding to after the frequency band extension coding is retained, and the high-frequency band signal is secondly encoded according to the spectrum retention flag of each frequency point of the high-frequency band signal. The spectrum retention flag of each frequency point of the high-frequency band signal can be used to avoid repeated encoding of the tone components that have been retained in the frequency band extension coding, thereby improving the encoding efficiency of the tone components.
[0106] For example, the above-mentioned audio encoding device or the core encoder inside the audio encoding device includes band extension coding when performing the first coding on the high-band signal and the low-band signal, so that the spectrum retention mark of each frequency point of the high-band signal can be recorded, that is, the spectrum retention mark of each frequency point of the high-band signal is used to determine whether the spectrum of each frequency point changes before and after the band expansion. The spectrum retention mark of each frequency point of the high-band signal can be used to avoid repeated coding of the tone components that have been reserved in the band extension coding, thereby improving the coding efficiency of the tone components. The specific implementation method can be found in the following Figure 4 Detailed explanation of the illustrated embodiment.
[0107] Figure 4 is a flowchart of an audio encoding method according to an embodiment of the present application. The execution subject of the embodiment of the present application may be the above-mentioned audio encoding device or a core encoder inside the audio encoding device, such as Figure 4 As shown, the method of this embodiment may include:
[0108] 401. Obtain a current frame of an audio signal, where the current frame includes a high-frequency band signal.
[0109] The current frame may be any frame in the audio signal, and the current frame may include a high-frequency band signal. It is not limited that, in addition to the high-frequency band signal, the current frame in the embodiment of the present application may also include a low-frequency band signal, wherein the division of the high-frequency band signal and the low-frequency band signal may be determined by a frequency band threshold, a signal above the frequency band threshold is a high-frequency band signal, and a signal below the frequency band threshold is a low-frequency band signal, and the determination of the frequency band threshold may be determined based on the transmission bandwidth, the data processing capabilities of the audio encoding device and the audio decoding device, which is not limited here.
[0110] Among them, the high-frequency band signal and the low-frequency band signal are relative, for example, the signal below a certain frequency threshold is a low-frequency band signal, and the signal above the frequency threshold is a high-frequency band signal (the signal corresponding to the frequency threshold can be classified as both a low-frequency band signal and a high-frequency band signal). The frequency threshold varies depending on the bandwidth of the current frame. For example, when the current frame is a broadband signal with a signal bandwidth of 0-8 kHz, the frequency threshold can be 4kHz; when the current frame is an ultra-wideband signal with a signal bandwidth of 0-16kHz, the frequency threshold can be 8kHz.
[0111] It should be noted that, in the embodiment of the present invention, the high-frequency band signal may be part or all of the signal in the high-frequency region. Specifically, the high-frequency region may vary depending on the signal bandwidth of the current frame and may also vary depending on the frequency threshold. For example, when the signal bandwidth of current frame is 0-8kHz, and the frequency threshold value is 4kHz, and the high-frequency region is 4-8kHz, then the high-frequency band signal can be the signal of 4-8kHz covering the whole high-frequency region, and it can also be the signal that only covers part of high-frequency region, for example, the high-frequency band signal can be 4-7kHz, 5-8kHz, 5-7kHz, or 4-6kHz and 7-8kHz (being that the high-frequency band signal can be discontinuous in frequency domain), etc.; when the signal bandwidth of current frame is 0-16kHz, and the frequency threshold value is 8kHz, and the high-frequency region is 8-16kHz, then the high-frequency band signal can be the signal of 8-16kHz covering the whole high-frequency region, and it can also be the signal that only covers part of high-frequency region, for example, the high-frequency band signal can be 8-15kHz, 9-16kHz, 9-15kHz, or 8-10kHz and 11-16kHz (being that the high-frequency band signal can be discontinuous in frequency domain), etc. It is understandable that the frequency range covered by the high-frequency band signal can be set as needed, or the frequency range encoded in the subsequent step 402 can be adaptively determined as needed, for example, the frequency range for tone component screening can be adaptively determined as needed.
[0112] The frequency range that needs to be filtered for tone components can be determined according to the number of frequency regions that need to be filtered for tone components. Specifically, the number of frequency regions that need to be filtered for tone components can be pre-specified.
[0113] 402. Encode the high-frequency band signal to obtain encoding parameters of the current frame, the encoding including: tone component screening; the encoding parameters are used to represent information of target tone components of the high-frequency band signal, the target tone components are obtained after tone component screening, and the tone component information includes position information, quantity information, and amplitude information or energy information of the tone components.
[0114] Wherein, the audio coding device encodes the high frequency band signal in the current frame, and the coding parameters of the current frame can be output after encoding, and the coding parameters may also be referred to as high frequency band parameters. In the coding process shown in step 402, tone component screening is included, and tone component screening refers to screening the tone components of the high frequency band signal in the coding process, and the coding parameters are used to represent the target tone components obtained after the tone component screening, and the target tone components are used to refer in particular to the tone components obtained after the tone component screening in the coding process of the high frequency band signal. The information of the target tone components carried by the coding parameters in the embodiment of the present application is screened by the tone components, so a limited number of coding bits can be efficiently utilized to obtain a better tone component coding effect, thereby improving the coding quality of the audio signal.
[0115] In an embodiment of the present application, the coding parameters of the current frame are used to represent the position, quantity, amplitude or energy of the target tone component included in the high frequency band signal. For example, the coding parameters of the current frame include the position and quantity parameters of the target tone component, and the amplitude parameter or energy parameter of the target tone component. For another example, the coding parameters of the current frame include the position parameter, quantity parameter, and the amplitude parameter or energy parameter of the target tone component.
[0116] In the embodiment of the present application, the high frequency band corresponding to the high frequency band signal includes at least one frequency region, and a frequency region includes at least one sub-band. The process of obtaining the coding parameters of the current frame according to the high frequency band signal can be performed according to the frequency region division and / or sub-band division of the high frequency band.
[0117] The number of frequency regions may be predetermined or calculated according to an algorithm, and the method for determining the frequency regions is not limited in the embodiments of the present application. In the subsequent embodiments, the position number parameter of the target tone component and the amplitude parameter or energy parameter of the target tone component in a frequency region are used as an example for further explanation.
[0118] In the embodiment of the present application, the high frequency band may include K frequency regions (for example, each frequency region is called a tile), each frequency region may include M sub-bands, and the tonal component screening may be performed in units of frequency regions or in units of sub-bands. It is understandable that the number of sub-bands included in different frequency regions may be different.
[0119] It should be noted that after step 401 is executed, in addition to executing the aforementioned step 402, the following step A1 may also be executed:
[0120] A1. Perform first encoding on the high-frequency band signal and the low-frequency band signal to obtain first encoding parameters of the current frame, where the first encoding includes frequency band extension encoding.
[0121] After acquiring the high-frequency band signal and the low-frequency band signal, the audio encoding device can perform a first encoding on the high-frequency band signal and the low-frequency band signal, wherein the first encoding can include band extension encoding (i.e., audio band extension encoding, hereinafter referred to as band extension). Band extension encoding parameters (referred to as band extension parameters) can be obtained through band extension encoding. The decoding end can reconstruct the high-frequency information in the audio signal according to the band extension encoding parameters, thereby expanding the effective bandwidth of the audio signal and improving the quality of the audio signal.
[0122] In the embodiment of the present application, the high-band signal and the low-band signal are encoded in the first encoding process to obtain the first encoding parameter of the current frame, and the first encoding parameter can be used for code stream multiplexing. In some embodiments, the first encoding may include time domain noise shaping, frequency domain noise shaping, or spectrum quantization in addition to frequency band extension coding; accordingly, the first encoding parameter may include time domain noise shaping parameters, frequency domain noise shaping parameters, or spectrum quantization parameters in addition to frequency band extension coding parameters. The first encoding process is not described in detail in the embodiment of the present application.
[0123] It should be noted that the encoding of the high-frequency band signal and the low-frequency band signal in the above step A1 can be referred to as the first encoding, and the above step 402 can be performed after the execution of step A1, and the encoding of the high-frequency band signal in step 402 can be referred to as the second encoding. In the subsequent embodiments, the encoding process including the tonal component screening in step 402 is described as the second encoding.
[0124] 403. Perform code stream multiplexing on the encoding parameters to obtain an encoded code stream.
[0125] Among them, the audio encoding device performs code stream multiplexing on the encoding parameters to obtain an encoded code stream, for example, the encoded code stream can be a payload code stream. The payload code stream can carry specific information of each frame of the audio signal, for example, it can carry information of the target tone components of the above-mentioned each frame. The encoding parameters can obtain an encoded code stream through code stream multiplexing. The information of the target tone component carried in the encoded code stream obtained in the embodiment of the present application is screened by the tone component, so it can efficiently use the limited number of encoding bits to obtain a better tone component encoding effect, thereby improving the encoding quality of the audio signal.
[0126] In some embodiments of the present application, the coding parameters obtained by encoding the high-frequency band signal and the low-frequency band signal can be defined as the first coding parameters, and the coding parameters obtained in step 402 can be defined as the second coding parameters. Then, in step 403, the first coding parameters and the second coding parameters can also be multiplexed to obtain a coded code stream. For example, the coded code stream can be a payload code stream.
[0127] In some embodiments, the encoded code stream may further include a configuration code stream, which may carry configuration information common to each frame in the audio signal. The payload code stream and the configuration code stream may be independent code streams or included in the same code stream, that is, the payload code stream and the configuration code stream may be different parts of the same code stream.
[0128] The audio encoding device sends the encoded code stream to the audio decoding device, and the audio decoding device demultiplexes the encoded code stream to obtain the encoding parameters, thereby accurately obtaining the current frame of the audio signal.
[0129] Through the examples of the above-mentioned embodiments, it can be known that the current frame of the audio signal is obtained, the current frame includes a high-frequency band signal, and the high-frequency band signal is encoded to obtain the encoding parameters of the current frame. The encoding includes: tone component screening; the encoding parameters are used to represent the information of the target tone component of the high-frequency band signal, the target tone component is obtained after the tone component screening, and the tone component information includes the position information, quantity information, and amplitude information or energy information of the tone component. The encoding parameters are multiplexed to obtain the encoded bitstream. In the embodiment of the present application, the encoding process includes tone component screening, and the encoding parameters are used to represent the target tone component obtained after the tone component screening. The encoding parameters can obtain the encoded bitstream through bitstream multiplexing. The information of the target tone component carried in the encoded bitstream obtained in the embodiment of the present application is filtered by the tone component, so the limited number of encoding bits can be efficiently used to obtain a better tone component encoding effect, thereby improving the encoding quality of the audio signal.
[0130] Next, please refer to some other embodiments provided in this application. The execution subject of the embodiments of this application may be the above-mentioned audio encoding device or the core encoder inside the audio encoding device, such as Figure 5 As shown, the audio encoding method provided in the embodiment of the present application may include the following steps:
[0131] 501. Obtain a current frame of an audio signal, where the current frame includes a high-frequency band signal.
[0132] Among them, step 501 executed by the audio encoding device is similar to step 401 in the above-mentioned embodiment, and will not be repeated here.
[0133] After the audio encoding device executes step 501, the audio encoding device can encode the high frequency band signal of the current frame to obtain the encoding parameters of the current frame. The high frequency band corresponding to the high frequency band signal includes at least one frequency region, and the number of frequency regions included in the high frequency band is not limited in the embodiment of the present application. For example, at least one frequency region includes the current frequency region, and the current frequency region can be a certain frequency region in at least one frequency region or any frequency region in at least one frequency region, which is not limited here.
[0134] Next, the encoding process of the high frequency band signal in the current frequency region is described as an example. Specifically, the audio encoding device may perform subsequent steps 502 to 504.
[0135] 502. Obtain information of candidate tone components in the current frequency region according to the high frequency band signal in the current frequency region.
[0136] In an embodiment of the present application, after obtaining the high frequency band signal of the current frequency region, the audio encoding device extracts information of candidate tone components of the current frequency region from the high frequency band signal of the current frequency region. The information of the candidate tone components may include: position information, quantity information, and amplitude information or energy information of the candidate tone components. The information of the candidate tone components needs to be screened by the tone components in the subsequent step 503 before the information of the target tone components can be obtained.
[0137] Among them, the audio encoding device can perform peak search according to the high frequency band signal of the current frequency region, and directly use the obtained peak information of the current frequency region as the information of the candidate tonal component of the current frequency region, and the peak information of the current frequency region includes: the peak quantity information, peak position information, and peak energy information or peak amplitude information of the current frequency region. Specifically, the high frequency band signal power spectrum of the current frequency region can be obtained according to the high frequency band signal of the current frequency region; according to the power spectrum of the high frequency band signal of the current frequency region (referred to as the current region), the peak of the power spectrum is searched, the number of peaks in the power spectrum is used as the peak quantity information of the current region, the frequency point sequence number corresponding to the peak in the power spectrum is used as the peak position information of the current region, and the amplitude or energy of the peak in the power spectrum is used as the peak amplitude information or peak energy information of the current region. It is also possible to obtain the power spectrum ratio of the current frequency point of the current frequency region according to the high frequency band signal of the current frequency region, the power spectrum ratio of the current frequency point is the ratio of the power spectrum value of the current frequency point to the average value of the power spectrum of the current frequency region; according to the power spectrum ratio of the current frequency point, a peak search is performed in the current frequency region to obtain the number information of the peaks in the current frequency region, the position information of the peaks, the amplitude information of the peaks, or the energy information of the peaks. Among them, the amplitude information of the peak or the energy information of the peak includes: the power spectrum ratio of the peak, and the power spectrum ratio of the peak is the ratio of the value of the power spectrum of the frequency point corresponding to the peak to the average value of the power spectrum of the current frequency region. Of course, other methods can also be used to search for peaks to obtain the peak quantity information, peak position information, and peak amplitude information or peak energy information of the current area, which is not limited in the embodiments of the present application.
[0138] In some embodiments of the present application, the quantity information of the candidate tone components may be the peak quantity information obtained by the peak search, the position information of the candidate tone components may be the peak position information obtained by the peak search, the amplitude information of the candidate tone components may be the peak amplitude information obtained by the peak search, and the energy information of the candidate tone components may be the peak energy information obtained by the peak search.
[0139] In one embodiment of the present application, the position information and energy information of the candidate tone components of the current frequency region are stored in the peak_idx and peak_val arrays respectively, and the quantity information of the candidate tone components of the current frequency region is recorded as peak_cnt.
[0140] The high-frequency band signal for peak search may be a frequency domain signal or a time domain signal.
[0141] Specifically, in one implementation, the peak search may be performed based on at least one of a power spectrum, an energy spectrum, or an amplitude spectrum of the current frequency region.
[0142] 503. Perform tone component screening on the information of candidate tone components in the current frequency region to obtain information of target tone components in the current frequency region.
[0143] In an embodiment of the present application, the audio encoding device performs tone component screening on information of candidate tone components in the current frequency region, and after completing the tone component screening, information of target tone components in the current frequency region can be obtained.
[0144] Specifically, the information of the candidate tone components includes the quantity information, position information, and amplitude information or energy information of the candidate tone components. The tone components can be screened based on the quantity information, position information, and amplitude information or energy information of the candidate tone components to obtain the quantity information, position information, and amplitude information or energy information of the candidate tone components after the screening; the quantity information, position information, and amplitude information or energy information of the candidate tone components after the screening is used as the quantity information, position information, amplitude information or energy information of the target tone components in the current frequency region. Among them, the tone component screening can be one or more of the processes such as merging processing, quantity screening, and inter-frame continuity correction. The embodiments of the present application do not limit whether other processing is performed and the types and methods of other processing.
[0145] 504. Obtain encoding parameters of the current frequency region according to information of the target pitch component of the current frequency region.
[0146] In an embodiment of the present application, the audio encoding device can obtain the coding parameters of the current frequency region according to the information of the target tone component of the current frequency region. It should be noted that the coding parameters of the current frequency region obtained here are similar to the coding parameters obtained in step 402 in the aforementioned embodiment, and the difference is that what step 402 obtains is the coding parameters of the current frame, while the coding parameters of the current frequency region in the current frame obtained in step 504, through an implementation method similar to step 504, the coding parameters of all frequency regions in the current frame can be obtained, and the coding parameters of all frequency regions in the current frame constitute the coding parameters of the current frame. In addition, the coding parameters of the current frequency region obtained in step 504 can be referred to as the second coding parameters. The second coding parameters of the current frequency region include the position quantity parameters of the target tone component of the current frequency region, and the amplitude parameter or energy parameter of the target tone component, wherein the position quantity parameter is used to indicate the position information and quantity information of the target tone component of the high-frequency band signal, the amplitude parameter is used to indicate the amplitude information of the target tone component of the high-frequency band signal, and the energy parameter is used to indicate the energy information of the target tone component of the high-frequency band signal.
[0147] 505. Perform code stream multiplexing on the encoding parameters to obtain an encoded code stream.
[0148] In the above-mentioned embodiment, the audio encoding device obtains the encoding parameters through step 504, and finally multiplexes the encoding parameters to obtain an encoding stream, which can be a payload stream. The payload stream can carry specific information of each frame of the audio signal. For example, it can carry the tone component information of each frame. The encoding parameters can obtain an encoding stream through stream multiplexing, and the information of the target tone component carried in the encoding stream obtained in the embodiment of the present application is filtered by the tone component.
[0149] The audio encoding device sends the encoded code stream to the audio decoding device, and the audio decoding device demultiplexes the encoded code stream to obtain the encoding parameters, thereby accurately obtaining the current frame of the audio signal.
[0150] It can be seen from the examples of the present application in the aforementioned embodiments that the encoding process in the embodiments of the present application includes tone component screening for information of candidate tone components, and the encoding parameters are used to represent the target tone components obtained after the tone component screening. The encoding parameters can obtain the encoded bitstream through bitstream multiplexing. The information of the target tone component carried in the encoded bitstream obtained in the embodiments of the present application is filtered by the tone components. Therefore, the limited number of encoding bits can be efficiently utilized to obtain a better tone component encoding effect, thereby improving the encoding quality of the audio signal.
[0151] Next, please refer to some other embodiments provided in this application. The execution subject of the embodiments of this application may be the above-mentioned audio encoding device or the core encoder inside the audio encoding device, such as Figure 6 As shown, the method of this embodiment may include:
[0152] 601. Obtain a current frame of an audio signal, where the current frame includes a high-frequency band signal.
[0153] Among them, step 601 executed by the audio encoding device is similar to step 401 in the above-mentioned embodiment, and will not be repeated here.
[0154] After the audio encoding device executes step 601, the audio encoding device may encode the high frequency band signal of the current frame to obtain the encoding parameters of the current frame, and the high frequency band corresponding to the high frequency band signal includes at least one frequency region, and the number of frequency regions included in the high frequency band is not limited in the embodiment of the present application. For example, at least one frequency region includes the current frequency region, and the current frequency region may be a certain frequency region in at least one frequency region or any frequency region in at least one frequency region, which is not limited here.
[0155] Next, the encoding process of the high frequency band signal in the current frequency region is described as an example. Specifically, the audio encoding device may perform subsequent steps 602 to 605.
[0156] 602. Perform peak search based on the high frequency band signal of the current frequency region to obtain peak information of the current frequency region, where the peak information of the current frequency region includes: peak quantity information, peak position information, and peak energy information or peak amplitude information of the current frequency region.
[0157] In an embodiment of the present application, the audio encoding device can perform a peak search based on the high-frequency band signal of the current frequency region to obtain the peak information of the current frequency region. Specifically, the power spectrum of the high-frequency band signal of the current frequency region can be obtained based on the high-frequency band signal of the current frequency region; the peak of the power spectrum is searched based on the power spectrum of the high-frequency band signal of the current frequency region (referred to as the current region), the number of peaks in the power spectrum is used as the peak number information of the current region, the frequency point sequence number corresponding to the peak in the power spectrum is used as the peak position information of the current region, and the amplitude or energy of the peak in the power spectrum is used as the peak amplitude information or peak energy information of the current region. It is also possible to obtain the power spectrum ratio of the current frequency point of the current frequency region based on the high-frequency band signal of the current frequency region, the power spectrum ratio of the current frequency point is the ratio of the value of the power spectrum of the current frequency point to the average value of the power spectrum of the current frequency region; perform a peak search in the current frequency region based on the power spectrum ratio of the current frequency point to obtain the number information of the peaks in the current frequency region, the position information of the peaks, the amplitude information of the peaks, or the energy information of the peaks. Among them, the amplitude information of the peak or the energy information of the peak includes: the power spectrum ratio of the peak, wherein the power spectrum ratio of the peak is the ratio of the value of the power spectrum of the frequency point corresponding to the peak to the average value of the power spectrum of the current frequency region. Of course, other methods can also be used to perform peak search to obtain the peak quantity information, peak position information, and peak amplitude information or peak energy information of the current area, which is not limited in the embodiments of the present application.
[0158] In one embodiment of the present application, the peak search may be performed based on at least one of a power spectrum, an energy spectrum, or an amplitude spectrum in the current frequency region.
[0159] 603. Perform peak screening on the peak information of the current frequency region to obtain information on candidate tone components of the current frequency region.
[0160] Among them, after the audio encoding device obtains the peak information of the current frequency region, it performs peak screening on the peak information of the current frequency region, and can obtain the information of the candidate tone components of the current frequency region. The specific method of peak screening can be to obtain the peak number information, peak position information, peak amplitude information or peak energy information of the current frequency region after screening based on the spectrum retention flag information of the frequency band expansion of the current frequency region and the peak number information, peak position information and peak amplitude information or peak energy information of the current frequency region. The peak number information, peak position information and peak amplitude information or peak energy information after screening of the current frequency region is used as the information of the candidate tone components of the current frequency region. Among them, the peak amplitude information or peak energy information may include the energy ratio of the peak, or the power spectrum ratio of the peak.
[0161] In some embodiments of the present application, the quantity information of the candidate tone components may be the peak quantity information after peak filtering, the position information of the candidate tone components may be the peak position information after peak filtering, the amplitude information of the candidate tone components may be the peak amplitude information after peak filtering, and the energy information of the candidate tone components may be the peak energy information after peak filtering.
[0162] The audio encoding device may obtain the value of the spectrum reservation flag of each frequency point in the high-frequency band signal in a variety of ways, which will be described in detail below.
[0163] In some embodiments of the present application, a value of a spectrum reservation flag of a first frequency point in a current frequency region in at least one frequency region that does not belong to a frequency range of frequency band extension coding is a first preset value;
[0164] If the spectrum value before band extension coding and the spectrum value after band extension coding corresponding to the second frequency point in the frequency range of band extension in the current frequency region meet the preset conditions, then the value of the spectrum retention flag of the second frequency point is the second preset value; if the spectrum value before band extension coding and the spectrum value after band extension coding corresponding to the second frequency point do not meet the preset conditions, then the value of the spectrum retention flag of the second frequency point is the third preset value.
[0165] Among them, the audio encoding device first determines whether the frequency point in the current frequency region belongs to the frequency range of the band extension coding, for example, defines the first frequency point as a frequency point in the current frequency region that does not belong to the frequency range of the band extension coding, and defines the second frequency point as a frequency point in the current frequency region that belongs to the frequency range of the band extension coding. Then the value of the spectrum reservation mark of the first frequency point is the first preset value. There are two values of the spectrum reservation mark of the second frequency point, for example, the second preset value and the third preset value. Specifically, when the spectrum value before the band extension coding and the spectrum value after the band extension coding corresponding to the second frequency point meet the preset condition, the value of the spectrum reservation mark of the second frequency point is the second preset value, and when the spectrum value before the band extension coding and the spectrum value after the band extension coding corresponding to the second frequency point do not meet the preset condition, the value of the spectrum reservation mark of the second frequency point is the third preset value. There are many ways to implement the preset condition, which are not limited here. For example, the preset condition is a condition set for the spectrum value before the band extension coding and the spectrum value after the band extension coding, which can be determined in combination with the application scenario.
[0166] 604. Perform tone component screening on the information of candidate tone components in the current frequency region to obtain information of target tone components in the current frequency region.
[0167] In an embodiment of the present application, the information of the candidate tone components of the current frequency region obtained by the audio encoding device includes: position information, quantity information, and amplitude information or energy information of the candidate tone components. Tone component screening is performed on the information of the candidate tone components of the current frequency region to obtain information of the target tone components of the current frequency region.
[0168] Specifically, the information of the candidate tone components includes the quantity information, position information, and amplitude information or energy information of the candidate tone components. The tone components can be screened based on the quantity information, position information, and amplitude information or energy information of the candidate tone components to obtain the quantity information, position information, and amplitude information or energy information of the candidate tone components after the screening; the quantity information, position information, and amplitude information or energy information of the candidate tone components after the screening is used as the quantity information, position information, amplitude information or energy information of the target tone components in the current frequency region. Among them, the tone component screening can be one or more of the processes such as merging processing, quantity screening, and inter-frame continuity correction. The embodiments of the present application do not limit whether other processing is performed and the types and methods of other processing.
[0169] 605. Obtain encoding parameters of the current frequency region according to information of the target pitch component of the current frequency region.
[0170] In an embodiment of the present application, the audio encoding device can obtain the coding parameters of the current frequency region according to the information of the target tone component of the current frequency region. It should be noted that the coding parameters of the current frequency region obtained here are similar to the coding parameters obtained in step 402 in the aforementioned embodiment. The difference is that what step 402 obtains is the coding parameters of the current frame, while the coding parameters of the current frequency region in the current frame obtained in step 605 can obtain the coding parameters of all frequency regions in the current frame through an implementation similar to step 605. The coding parameters of all frequency regions in the current frame. In addition, the coding parameters of the current frequency region obtained in step 605 can be referred to as second coding parameters. The second coding parameters of the current frequency region include the position quantity parameters of the target tone component of the current frequency region, and the amplitude parameters or energy parameters of the target tone component. The position quantity parameters are used to indicate the position information and quantity information of the target tone component of the high-frequency band signal, the amplitude parameters are used to indicate the amplitude information of the target tone component of the high-frequency band signal, and the energy parameters are used to indicate the energy information of the target tone component of the high-frequency band signal.
[0171] 606. Perform code stream multiplexing on the encoding parameters to obtain an encoded code stream.
[0172] The audio encoding device performs code stream multiplexing on the encoding parameters to obtain an encoded code stream, for example, the encoded code stream may be a payload code stream. The payload code stream may carry specific information of each frame of the audio signal. For example, it may carry the tone component information of each frame. The encoding parameters may be obtained by code stream multiplexing, and the information of the target tone component carried in the encoded code stream obtained in the embodiment of the present application is filtered by the tone component.
[0173] The audio encoding device sends the encoded code stream to the audio decoding device, and the audio decoding device demultiplexes the encoded code stream to obtain the encoding parameters, thereby accurately obtaining the current frame of the audio signal.
[0174] It can be seen from the examples of the present application through the aforementioned embodiments that the encoding process in the embodiments of the present application includes peak screening for peak information of the current frequency region, and tone component screening for information of candidate tone components. The encoding parameters are used to represent the target tone components obtained after tone component screening. The encoding parameters can obtain the encoded bitstream through bitstream multiplexing. The information of the target tone component carried in the encoded bitstream obtained in the embodiments of the present application is filtered by the tone components. Therefore, the limited number of encoding bits can be efficiently utilized to obtain better tone component encoding effects and improve the encoding quality of the audio signal.
[0175] In some embodiments of the present application, the high frequency band corresponding to the high frequency band signal includes at least one frequency region, and the number of frequency regions included in the high frequency band is not limited in the embodiments of the present application. For example, at least one frequency region includes the current frequency region, and the current frequency region may be a certain frequency region in the at least one frequency region or any frequency region in the at least one frequency region, which is not limited here.
[0176] Next, the encoding process of the high-frequency band signal in the current frequency region is explained as an example. After the audio encoding device obtains the information of the candidate tone components in the current frequency region, the audio encoding device can execute step 503 or step 604 in the aforementioned embodiment to perform tone component screening on the information of the candidate tone components in the current frequency region to obtain the information of the target tone components in the current frequency region.
[0177] In the embodiment of the present application, the current frequency region may include one or more sub-bands, and the number of sub-bands included in the current frequency region is not limited. For example, the current frequency region includes the current sub-band, and the current sub-band may be a sub-band in the current frequency region or any sub-band in the current frequency region, which is not limited here.
[0178] Next, the process of selecting the tone components of the current sub-band is used as an example to illustrate. In the embodiment of the present application, the selection of tone components may include at least one of the following: merging processing of candidate tone components, inter-frame continuity correction processing, and quantity selection.
[0179] Specifically, Figure 7 As shown, taking the tone component screening including the merging process as an example, the audio encoding device performs tone component screening on the information of the candidate tone components in the current frequency region to obtain the information of the target tone components in the current frequency region, including:
[0180] 701. Perform a merge process on candidate tone components with the same sub-band sequence number in a current frequency region to obtain information on the merged candidate tone components in the current frequency region.
[0181] Among them, the audio encoding device can obtain the subband serial numbers corresponding to all candidate tone components in the current frequency region, and merge the candidate tone components with the same subband serial numbers in the current frequency region. For example, if two candidate tone components in the current frequency region belong to the same subband, then these two candidate tone components can be merged into one merged candidate tone component in the current frequency region. For subbands in the current frequency region that only contain one candidate tone component or no candidate tone components, there is no need to perform merging. After completing the merging process for the current frequency region, information about the merged candidate tone components is obtained. It is not limited that, in an embodiment of the present application, if three or more candidate tone components in the current frequency region belong to the same subband, then these three or more candidate tone components can be merged into one candidate tone component in the current frequency region.
[0182] In some embodiments of the present application, each subband of the current frequency region has a subband sequence number, and the subband sequence number is determined by the position information of the candidate tone components of the current frequency region and the subband width of the current frequency region. For example, the subband sequence number corresponding to each candidate tone component in the current frequency region is calculated based on the subband width of the current frequency region and the position information of the candidate tone components of the current frequency region.
[0183] In some embodiments of the present application, the subband width of the current frequency region is a preset first value, or the subband width of the current frequency region is determined according to the sequence number of the current frequency region included in the high frequency band corresponding to the high frequency band signal.
[0184] There are multiple values of the subband width of the current frequency region, for example, the subband width of the current frequency region is a first value, that is, the subband width of the current frequency region is a fixed value. Or the subband width of the current frequency region is obtained by calculation, for example, the subband width of the current frequency region is determined according to the sequence number of the current frequency region included in the high frequency band corresponding to the high frequency band signal, and is adaptively selected according to different current frequency regions. The subband width can be the number of frequency points included in a subband, and the subband widths of different frequency regions can be different.
[0185] In some embodiments of the present application, step 701 combines candidate tone components with the same sub-band sequence number in the current frequency region to obtain information of the combined candidate tone components, which may specifically include the following steps:
[0186] If the number of candidate tone components in the current frequency region is greater than or equal to 2, determining two adjacent candidate tone components in the current frequency region as a first candidate tone component and a second candidate tone component in the current frequency region;
[0187] A first subband sequence number corresponding to the first candidate tone component and a second subband sequence number corresponding to the second candidate tone component are obtained respectively. If the first subband sequence number and the second subband sequence number are the same, the first candidate tone component and the second candidate tone component are merged to obtain information of the first merged candidate tone component. The subband sequence number corresponding to the first merged candidate tone component is equal to the first subband sequence number and the second subband sequence number.
[0188] Furthermore, if there is a third candidate tone component adjacent to the second candidate tone component among the candidate tone components in the current frequency region, the third subband sequence number corresponding to the third candidate tone component is obtained; if the third subband sequence number is the same as the subband sequence number corresponding to the first merged candidate tone component, the first merged candidate tone component and the third candidate tone component are merged to obtain information on the candidate tone components after the merge processing in the current frequency region.
[0189] If the candidate tone components in the current frequency region do not have a third candidate tone component adjacent to the second candidate tone component, the first merged candidate tone component is the information of the merged candidate tone component.
[0190] It is understandable that if there is a fourth candidate tone component adjacent to the third candidate tone component in the current frequency region, it can also be merged based on the above method when the sub-band numbers are the same to obtain information on the merged candidate tone component of the current frequency region.
[0191] In some embodiments of the present application, the at least one subband includes a current subband;
[0192] The information of the merged candidate tone components of the current frequency region includes: the position information of the merged candidate tone components of the current sub-band, and the amplitude information or energy information of the merged candidate tone components of the current sub-band;
[0193] The position information of the candidate tone components after the merging process of the current sub-band includes: the position information of one candidate tone component among the candidate tone components before the merging process of the current sub-band;
[0194] The amplitude information or energy information of the candidate tone components after the merging process of the current subband includes: the amplitude information or energy information of one candidate tone component among the candidate tone components before the merging process of the current subband, or the amplitude information or energy information of the candidate tone components after the merging process of the current subband is calculated based on the amplitude information or energy information of the candidate tone components before the merging process of the current subband.
[0195] Specifically, at least one subband includes the current subband, and the candidate tone component after merging of the current subband may be one of the candidate tone components of the current subband. That is, the information of one of the candidate tone components of the current subband is the candidate tone component after merging of the current subband. Specifically, the position information of the candidate after merging of the current subband includes the position information of one of the candidate tone components of the current subband, the amplitude information or energy information of the candidate tone component after merging of the current subband includes the amplitude information or energy information of one of the candidate tone components of the current subband, or the amplitude information or energy information of the candidate tone component after merging of the current subband is calculated based on the amplitude information or energy information of the candidate tone components of the current subband. There is no limitation on the calculation method. For example, the average value of the amplitude information or energy information of multiple candidate tone components of the current subband can be taken as the candidate amplitude information or energy information after the merging process of the current subband. For another example, the sum of the amplitude information or energy information of multiple candidate tone components of the current subband can be taken as the candidate amplitude information or energy information after the merging process of the current subband. For another example, the calculation method can also be to perform weighted averaging on the amplitude information or energy information of multiple candidate tone components of the current subband, which is not limited here. In the embodiment of the present application, after the merging process, the information of the candidate tone components of the current subband after the merging process can be obtained through the information of the candidate tone components of the current subband.
[0196] In some embodiments of the present application, the information of the candidate tone components after the merging process of the current frequency region further includes: the quantity information of the candidate tone components after the merging process of the current frequency region;
[0197] The number information of the candidate tone components after the merging process of the current frequency region is the same as the number information of the subbands having the candidate tone components in the current frequency region. The subbands having the candidate tone components in the current frequency region refer to the subbands containing the candidate tone components before the merging process in the current frequency region. In the embodiment of the present application, after the merging process, the information of the candidate tone components after the merging process of the current frequency region can be obtained based on the information of the candidate tone components in the current frequency region.
[0198] In some embodiments of the present application, before step 701 performs merging processing on candidate tone components with the same sub-band sequence number in the current frequency region, the audio encoding method provided by the embodiment of the present application further includes the following steps:
[0199] B1. Arrange the candidate tone components in the current frequency region in ascending or descending order according to the position information of the candidate tone components in the current frequency region to obtain the arranged candidate tone components in the current frequency region.
[0200] Specifically, in the case of executing step B1, the aforementioned step 701 combines the candidate tone components with the same sub-band sequence number in the current frequency region, which may specifically include the following steps:
[0201] According to the candidate tone components arranged in positions in the current frequency region, the candidate tone components with the same sub-band sequence number in the current frequency region are merged.
[0202] Among them, the merging process can be based on the position information of the candidate tone components in the current frequency region, and the candidate tone components are arranged in increasing or decreasing order according to the position information; for the candidate tone components arranged in increasing or decreasing order according to the position information, the subband sequence numbers corresponding to the two candidate tone components with adjacent position information are calculated; if the subband sequence numbers corresponding to the two candidate tone components with adjacent positions are the same, the two candidate tone components are merged to obtain the number information, position information and energy or amplitude information of the candidate tone components after merging in the current frequency region. The subband sequence number is determined by the position information of the candidate tone component and the subband width of the current frequency region. The subband width of the current frequency region can be a preset value, or adaptively selected according to different frequency regions. The subband width can be the number of frequency points contained in a subband. The subband width of different frequency regions can be different. The position information of the merged candidate tone component can be the position information of any one of the two adjacent candidate tone components; the energy or amplitude information of the merged candidate tone component can be the energy or amplitude information of any one of the two adjacent candidate tone components, or calculated based on the energy or amplitude information of the two adjacent candidate tone components.
[0203] 702. Obtain information of a target tone component in the current frequency region according to information of the candidate tone components after merging processing in the current frequency region.
[0204] Among them, after the audio encoding device executes step 701 to obtain the information of the candidate tone components after the merging process of the current frequency region, the information of the target tone components of the current frequency region can be obtained based on the information of the candidate tone components after the merging process of the current frequency region. Specifically, there are multiple ways to implement the association relationship between the information of the candidate tone components after the merging process of the current frequency region and the information of the target tone components.
[0205] In some embodiments of the present application, the information of the candidate tone components after the merging process is directly used as the information of the target tone component.
[0206] In some embodiments of the present application, step 702 of obtaining information of a target tone component in the current frequency region according to information of the candidate tone components after merging processing in the current frequency region includes:
[0207] C1. Obtain information about target tone components in the current frequency region based on information about candidate tone components after merging in the current frequency region and information about the maximum number of tone components that can be encoded in the current frequency region.
[0208] Among them, the tonal component screening may include a quantity screening process, and the audio encoding device may perform a quantity screening process on the information of the candidate tonal components after the merging process obtained in step 701 according to the information of the maximum number of tonal components that can be encoded in the current frequency region, and the information of the maximum number of tonal components that can be encoded in the current frequency region refers to the maximum number of tonal components that can be used for encoding in the current frequency region, and the information of the maximum number of tonal components that can be encoded in the current frequency region may be set to a preset second value, or selected according to the encoding rate. After the quantity screening is performed based on the information of the candidate tonal components after the merging process and the information of the maximum number of tonal components that can be encoded in the current frequency region, the information of the candidate tonal components after the quantity screening of the current frequency region is obtained, and the information of the candidate tonal components after the quantity screening of the current frequency region is the information of the target tonal components of the current frequency region.
[0209] In the embodiment of the present application, the audio encoding device performs quantity screening processing on the information of the merged candidate tone components according to the information of the maximum number of tone components that can be encoded in the current frequency region, so as to obtain the information of the candidate tone components after quantity screening in the current frequency region. Through the quantity screening processing, the number of candidate tone components in the current frequency region can be reduced, thereby improving the encoding efficiency of the audio signal.
[0210] Further, in some embodiments of the present application, step C1 obtains information of target tone components in the current frequency region according to information of candidate tone components after merging processing in the current frequency region and information of the maximum number of tone components that can be encoded in the current frequency region, including:
[0211] C11. Arrange the candidate tone components after merging the current frequency region according to energy information or amplitude information based on the information of the candidate tone components after merging the current frequency region, so as to obtain the information of the candidate tone components after the arrangement of the energy information or amplitude information.
[0212] Among them, after obtaining the information of the candidate tone components after the merge processing of the current frequency region, the audio encoding device can first arrange the candidate tone components in ascending or descending order according to the energy information or amplitude information of the candidate tone components in the current frequency region.
[0213] C12. Obtain information about target tone components in the current frequency region based on information about candidate tone components arranged according to energy information or amplitude information and information about the maximum number of tone components that can be encoded in the current frequency region.
[0214] Among them, after the candidate tone components are arranged in ascending or descending order according to the position information, the information of the candidate tone components arranged according to the energy information or amplitude information obtained in step C11 is subjected to quantity screening processing, and the maximum number of tone components that can be encoded in the current frequency region refers to the maximum number of tone components that can be used for encoding in the current frequency region. The maximum number of tone components that can be encoded in the current frequency region can be set to a preset second value, or selected according to the encoding rate. After the information of the candidate tone components arranged according to the energy information or amplitude information and the maximum number of tone components that can be encoded in the current frequency region are subjected to quantity screening, the information of the candidate tone components after quantity screening in the current frequency region is obtained, and the information of the candidate tone components after quantity screening in the current frequency region is the information of the target tone components in the current frequency region.
[0215] In some embodiments of the present application, step 702 of obtaining information of a target tone component in the current frequency region according to information of the candidate tone components after merging processing in the current frequency region includes:
[0216] D1. According to the information of the candidate tone components after the merging process in the current frequency region and the information of the maximum number of tone components that can be encoded in the current frequency region, the information of the candidate tone components after the number screening in the current frequency region is obtained.
[0217] Among them, the tone component screening may include quantity screening processing. The audio encoding device can perform quantity screening processing on the information of the merged candidate tone components obtained in step 701 based on the maximum number of tone components that can be encoded in the current frequency region. The maximum number of tone components that can be encoded in the current frequency region refers to the maximum number of tone components that can be used for encoding in the current frequency region. The maximum number of tone components that can be encoded in the current frequency region can be set to a preset second value, or selected according to the encoding rate.
[0218] D2. Obtain information of target tone components in the current frequency region based on information of candidate tone components screened according to the number of current frequency regions.
[0219] In the embodiment of the present application, the audio encoding device performs quantity screening processing on the information of the merged candidate tone components according to the information of the maximum number of tone components that can be encoded in the current frequency region, so as to obtain the information of the candidate tone components after quantity screening in the current frequency region. Through the quantity screening processing, the number of candidate tone components in the current frequency region can be reduced, thereby improving the encoding efficiency of the audio signal.
[0220] Further, in some embodiments of the present application, the aforementioned step D1 obtains information of candidate tone components after the number of candidate tone components in the current frequency region of the current frame is screened according to the information of the candidate tone components after the merging process of the current frequency region and the information of the maximum number of tone components that can be encoded in the current frequency region, including:
[0221] D11. Arrange the candidate tone components after merging the current frequency region according to energy information or amplitude information based on the information of the candidate tone components after merging the current frequency region, so as to obtain the information of the candidate tone components after the arrangement of the energy information or amplitude information.
[0222] Before performing the quantity screening process, the audio encoding device may arrange the candidate tone components after the merging process according to the energy information or the amplitude information based on the information of the candidate tone components after the merging process to obtain the information of the candidate tone components after the energy information or the amplitude information is arranged.
[0223] D12. According to the information of the candidate tone components arranged by energy information or amplitude information and the information of the maximum number of tone components that can be encoded in the current frequency region, obtain the information of the candidate tone components after the number of the current frequency region of the current frame is screened.
[0224] The audio encoding device can perform quantity screening processing on the information of the candidate tone components after the energy information or amplitude information is arranged in step D11. When performing the quantity screening processing, it is also necessary to obtain the maximum number of tone components that can be encoded in the current frequency region. The maximum number of tone components that can be encoded in the current frequency region refers to the maximum number of tone components that can be used for encoding in the current frequency region. The maximum number of tone components that can be encoded in the current frequency region can be set to a preset second value, or selected according to the encoding rate.
[0225] Further, according to the quantity information, position information and energy or amplitude information of the candidate tone components in the current frequency region, and the maximum tone component quantity information that can be encoded in the current frequency region, the quantity information, position information and amplitude or energy information of the tone components after the quantity screening of the current frequency region is determined, and it can be that the X candidate tone components with the largest energy or amplitude information are selected from the candidate tone components after the energy information or amplitude information is arranged in the current frequency region, and their corresponding position information and energy or amplitude information are used as the position information and energy or amplitude information of the tone components after the quantity screening of the current frequency region. X is the quantity information of the tone components after the quantity screening of the current frequency region. Wherein, X is less than or equal to the maximum tone component quantity information that can be encoded in the current frequency region.
[0226] In some embodiments of the present application, step D2 obtains information of target tone components in the current frequency region according to information of candidate tone components screened by the number of the current frequency region, including:
[0227] D21. According to the position information of the candidate tone components after being screened by the number of current frequency regions of the current frame, the candidate tone components after being screened by the number of current frequency regions of the current frame are arranged in ascending or descending positions to obtain the candidate tone components arranged in positions after being screened by the number of current frequency regions of the current frame.
[0228] Specifically, the audio encoding device first arranges the candidate tone components whose quantity is screened in the current frequency region of the current frame in ascending or descending positions to obtain the candidate tone components whose quantity is screened and whose positions are arranged in the current frequency region of the current frame.
[0229] D22. Obtain subband sequence numbers corresponding to the candidate tone components sorted according to the number of the current frequency regions of the current frame.
[0230] The audio encoding device may obtain the subband sequence number corresponding to the candidate tone components after the position sorting after the number screening of the current frequency region of the current frame, and the subband sequence number is determined by the position information of the candidate tone components and the subband width of the current frequency region. The subband width of the current frequency region may be a preset value, or may be adaptively selected according to different frequency regions. The subband width may be the number of frequency points contained in a subband. The subband widths of different frequency regions may be different.
[0231] D23. Obtain the subband sequence number corresponding to the candidate tone components after the number of the current frequency region of the previous frame of the current frame is screened and the positions are sorted.
[0232] Among them, the audio encoding device can obtain the subband sequence number corresponding to the candidate tone components after the number of screening and position sorting of the current frequency region of the previous frame of the current frame, and the subband sequence number is determined by the position information of the candidate tone components and the subband width of the current frequency region. The subband width of the current frequency region can be a preset value, or adaptively selected according to different frequency regions. The previous frame of the current frame refers to a frame located before the position of the current frame. For example, if the current frame is the mth frame, the previous frame can be the m-1th frame, and the value of m is an integer greater than or equal to 0.
[0233] D24. If the position information of the nth candidate tone component after the position sorting after the number of current frequency areas of the current frame is screened and the position information of the nth candidate tone component after the number of current frequency areas of the previous frame is screened meet the preset conditions, and the subband sequence number corresponding to the nth candidate tone component after the number of current frequency areas of the current frame is screened and the subband sequence number corresponding to the nth candidate tone component after the number of current frequency areas of the previous frame is different, then the position information of the nth candidate tone component after the number of current frequency areas of the current frame is screened and sorted is corrected to obtain the information of the target tone component of the current frequency area, and the nth candidate tone component is any candidate tone component after the number of current frequency areas is screened and sorted.
[0234] Among them, the audio encoding device can judge the position information of the candidate tone components of the current frame and the previous frame to determine whether the position information of the candidate tone components of the current frame needs to be corrected, and a preset condition is set. For example, taking the nth candidate tone components of the current frame and the previous frame as an example, the position information of the nth candidate tone component after the position sorting after the number of the current frequency region of the current frame is screened and the position information of the nth candidate tone component after the position sorting after the number of the current frequency region of the previous frame meets the preset condition, and the subband sequence number corresponding to the nth candidate tone component after the position sorting after the number of the current frequency region of the current frame is different from the subband sequence number corresponding to the nth candidate tone component after the position sorting after the number of the current frequency region of the previous frame is screened, then the position information of the nth candidate tone component after the position sorting after the number of the current frequency region of the current frame is corrected to obtain the information of the target tone component of the current frequency region, and the nth candidate tone component is any candidate tone component after the position sorting after the number of the current frequency region is screened, for example, n can be an integer greater than or equal to 0.
[0235] Furthermore, in the above step D24, after correcting the position information of the nth candidate tone component after the position sorting after the number of the current frequency region of the current frame is screened, the information of the target tone component of the current frequency region can be directly obtained. Alternatively, after correcting the position information of the nth candidate tone component after the position sorting after the number of the current frequency region of the current frame is screened, the information of the corrected candidate tone component of the current frequency region is obtained, and then based on the information of the corrected candidate tone component, the information of the target tone component of the current frequency region is obtained. For example, based on the obtained information of the target tone component of the current frequency region, the amplitude information or energy information of the corrected candidate tone component of the current frequency region is weighted and adjusted to obtain the information of the target tone component of the current frequency region.
[0236] In some embodiments of the present application, the preset conditions include: the difference between the position information of the nth candidate tone component after position sorting after the number of current frequency regions of the current frame is filtered and the position information of the nth candidate tone component after position sorting after the number of current frequency regions of the previous frame is filtered is less than or equal to a preset threshold.
[0237] Among them, the value of the preset threshold is not limited. There are multiple ways to implement the setting of the preset conditions in the embodiments of the present application. The above example is only an optional scheme. Other preset conditions can also be set based on the above preset conditions. For example, the ratio between the position information of the nth candidate tone component in the current frequency area of the current frame and the position information of the nth candidate tone component in the current frequency area of the previous frame is less than or equal to another preset threshold. There is no limitation on the value of the other preset threshold.
[0238] In some embodiments of the present application, the position information of the nth candidate tone component after the position sorting after the number of the current frequency region of the current frame is screened is modified, including:
[0239] The position information of the nth candidate tone component after the position sorting after the number of current frequency regions of the current frame is corrected to the position information of the nth candidate tone component after the position sorting after the number of current frequency regions of the previous frame is corrected.
[0240] As an example, the position information of the nth candidate tone component of the current frame in the frequency region is corrected, specifically, the position information of the nth candidate tone component in the current frequency region of the current frame is corrected to be the same as the nth candidate tone component in the current frequency region of the previous frame. According to the corrected quantity information, position information and energy or amplitude information of the candidate tone components, the quantity information, position information and amplitude or energy information of the target tone component in the current frequency region are determined.
[0241] In an embodiment of the present application, after performing the inter-frame continuity correction processing in the above-mentioned step D24, the audio encoding device can obtain the information of the target tone component in the current frequency area. Through the above-mentioned inter-frame continuity correction processing, the continuity of the tone component between adjacent frames and the sub-band distribution of the tone component are taken into account, and the limited number of coding bits is efficiently utilized to obtain a better tone component encoding effect, thereby improving the encoding quality.
[0242] Through the examples of the above-mentioned embodiments, it can be seen that the encoding process in the embodiments of the present application includes tonal component screening for the information of candidate tonal components, and the tonal component screening may include at least one of the following: merging processing, inter-frame continuity correction processing, and quantity screening. The high-frequency band signal after tonal component screening can generate coding parameters, and the coding parameters are used to represent the target tonal components obtained after tonal component screening. The coding parameters can obtain a coded bitstream through bitstream multiplexing. The information of the target tonal components carried in the coded bitstream obtained in the embodiments of the present application is tonal component screening, so the limited number of coding bits can be efficiently used to obtain a better tonal component coding effect, thereby improving the coding quality of the audio signal.
[0243] In some embodiments of the present application, the current frequency region includes at least one subband, and the at least one subband includes the current subband. When the audio encoding device performs tone component screening, it is also possible not to perform steps 701 and 702, but to perform merging processing through the following step E1. Specifically, step 503 or step 604 in the aforementioned embodiment, performing tone component screening on the information of the candidate tone components of the current frequency region to obtain the information of the target tone components of the current frequency region, includes:
[0244] E1. Merge candidate tone components with the same sub-band number in the current frequency region to obtain information on target tone components in the current frequency region.
[0245] The audio encoding device may obtain the subband numbers corresponding to all candidate tone components in the current frequency region, and merge the candidate tone components with the same subband numbers in the current frequency region. For example, if the subband numbers of two candidate tone components in the current frequency region are the same, the two candidate tone components may be merged into one merged candidate tone component in the current frequency region. After the merging process is completed for the current frequency region, the information of the target tone component in the current frequency region is obtained.
[0246] In some embodiments of the present application, at least one subband includes the current subband, and the target tone component of the current subband may be one of the candidate tone components of the current subband. Specifically, the position information of the target tone component of the current subband includes the position information of one of the candidate tone components of the current subband, and the amplitude information or energy information of the target tone component of the current subband includes the amplitude information or energy information of one of the candidate tone components of the current subband, or the amplitude information or energy information of the target tone component of the current subband is calculated based on the amplitude information or energy information of the candidate tone components of the current subband. There is no limitation on the calculation method, for example, the average value of the amplitude information or energy information of multiple candidate tone components of the current subband may be taken as the amplitude information or energy information of the target tone component of the current subband, and for another example, the sum of the amplitude information or energy information of multiple candidate tone components of the current subband may be taken as the candidate amplitude information or energy information after the merge processing of the current subband. For another example, the calculation method may also be to perform weighted averaging on the amplitude information or energy information of multiple candidate tone components of the current subband, which is not limited here. In the embodiment of the present application, after the merging process, the information of the target tone component of the current sub-band can be obtained through the information of the candidate tone component of the current sub-band.
[0247] In some embodiments of the present application, when the audio encoding device performs tone component screening, it is also possible not to perform step 701 and step 702, but to perform tone component screening through the following steps. Specifically, Figure 8 As shown, taking the tone component screening including the inter-frame continuity correction processing as an example for explanation, in step 503 or step 604 in the aforementioned embodiment, the audio encoding device performs tone component screening on the information of the candidate tone components in the current frequency region to obtain the information of the target tone components in the current frequency region, including:
[0248] 801. Obtain a subband sequence number corresponding to a candidate tone component in a current frequency region of a current frame according to position information of the candidate tone component in a current frequency region of a current frame.
[0249] In an embodiment of the present application, the audio encoding device first obtains the subband sequence number corresponding to the candidate tone component in the current frequency region of the current frame, and the subsequent tone component screening process can be implemented using the subband sequence number corresponding to the candidate tone component.
[0250] The audio encoding device may obtain the subband sequence number corresponding to the candidate tone components after the position of the current frequency region of the current frame is sorted, and the subband sequence number is determined by the position information of the candidate tone components and the subband width of the current frequency region. The subband width of the current frequency region may be a preset value, or may be adaptively selected according to different frequency regions. The subband width may be the number of frequency points contained in a subband. The subband widths of different frequency regions may be different.
[0251] Further, in some embodiments of the present application, the step 801 of obtaining the subband sequence number corresponding to the candidate tone component in the current frequency region of the current frame according to the position information of the candidate tone component in the current frequency region of the current frame includes:
[0252] F1. According to the position information of the candidate tone components in the current frequency region of the current frame, the candidate tone components in the current frequency region of the current frame are arranged in ascending or descending positions to obtain the candidate tone components after position arrangement in the current frequency region of the current frame.
[0253] Specifically, the audio encoding device obtains the position information of the candidate tone components in the current frequency region of the current frame, and then arranges the candidate tone components in the current frequency region in ascending or descending order to obtain the arranged candidate tone components in the current frequency region of the current frame.
[0254] F2. Obtain the subband sequence number corresponding to the candidate tone components in the current frequency region of the current frame according to the candidate tone components after position arrangement in the current frequency region.
[0255] Among them, after completing the position arrangement, the audio encoding device determines the candidate tone components after position arrangement in the current frequency region. Since the position sorting is performed in step F1, the subband sequence number corresponding to the candidate tone components in the current frequency region of the current frame can be quickly obtained.
[0256] 802. Obtain a subband sequence number corresponding to a candidate tone component in a current frequency region of a frame previous to a current frame.
[0257] Among them, the audio encoding device can obtain the subband sequence number corresponding to the candidate tone components after the position of the current frequency region of the previous frame of the current frame is sorted, and the subband sequence number is determined by the position information of the candidate tone components and the subband width of the current frequency region. The subband width of the current frequency region can be a preset value, or adaptively selected according to different frequency regions. The previous frame of the current frame refers to a frame located before the position of the current frame. For example, if the current frame is the mth frame, the previous frame can be the m-1th frame, and the value of m is an integer greater than or equal to 0.
[0258] 803. If the position information of the nth candidate tone component in the current frequency region of the current frame and the position information of the nth candidate tone component in the current frequency region of the previous frame meet the preset conditions, and the subband sequence number corresponding to the nth candidate tone component in the current frequency region of the current frame and the subband sequence number corresponding to the nth candidate tone component in the current frequency region of the previous frame are different, the position information of the nth candidate tone component in the current frequency region of the current frame is corrected to obtain the information of the target tone component in the current frequency region, and the nth candidate tone component is any candidate tone component in the current frequency region.
[0259] Among them, the audio encoding device can judge the position information of the candidate tone components in the current frame and the previous frame to determine whether the position information of the candidate tone components of the current frame needs to be corrected, and a preset condition is set. For example, taking the nth candidate tone component in the current frame and the previous frame as an example, the position information of the nth candidate tone component after the position sorting of the current frequency region of the current frame and the position information of the nth candidate tone component after the position sorting of the current frequency region of the previous frame meet the preset conditions, and the subband sequence number corresponding to the nth candidate tone component after the position sorting of the current frequency region of the current frame and the subband sequence number corresponding to the nth candidate tone component after the position sorting of the current frequency region of the previous frame are different, then the position information of the nth candidate tone component after the position sorting of the current frequency region of the current frame is corrected to obtain the information of the target tone component in the current frequency region, and the nth candidate tone component is any candidate tone component in the current frequency region, for example, n can be an integer greater than or equal to 0.
[0260] In some embodiments of the present application, the step 803 of correcting the position information of the nth candidate tone component in the current frequency region of the current frame includes:
[0261] The position information of the n-th candidate tone component in the current frequency region of the current frame is corrected to the position information of the n-th candidate tone component in the current frequency region of the previous frame.
[0262] As an example, the position information of the nth candidate tone component of the current frame in the frequency region is corrected, specifically, the position information of the nth candidate tone component in the current frequency region of the current frame is corrected to be the same as the nth candidate tone component in the current frequency region of the previous frame. According to the corrected quantity information, position information and energy or amplitude information of the candidate tone components, the quantity information, position information and amplitude or energy information of the target tone component in the current frequency region are determined.
[0263] In some embodiments of the present application, the preset conditions in the above step 803 include: the difference between the position information of the nth candidate tone component in the current frequency region of the current frame and the position information of the nth candidate tone component in the current frequency region of the previous frame is less than or equal to a preset threshold. The value of the preset threshold is not limited. There are multiple implementation methods for setting the preset conditions in the embodiments of the present application. The above example is only an optional solution. Other preset conditions can also be set based on the above preset conditions, such as the ratio between the position information of the nth candidate tone component in the current frequency region of the current frame and the position information of the nth candidate tone component in the current frequency region of the previous frame is less than or equal to another preset threshold. There is no limitation on the value of the other preset threshold.
[0264] Furthermore, in the above step 803, after the position information of the nth candidate tone component of the current frequency region of the current frame is corrected, the information of the target tone component of the current frequency region can be directly obtained. Alternatively, after the position information of the nth candidate tone component of the current frequency region of the current frame is corrected, the information of the corrected candidate tone component of the current frequency region is obtained, and then the information of the target tone component of the current frequency region is obtained based on the corrected candidate tone component information.
[0265] In the embodiment of the present application, the audio encoding device obtains the information of the target tone component in the current frequency region according to the information of the corrected candidate tone component. Through the inter-frame continuity correction process, the continuity of the tone component between adjacent frames and the sub-band distribution of the tone component are considered, and the limited number of coding bits is efficiently used to obtain a better tone component coding effect and improve the coding quality.
[0266] Through the examples of the above-mentioned embodiments, it can be seen that the encoding process in the embodiments of the present application includes tonal component screening for information of candidate tonal components, and the tonal component screening may include inter-frame continuity correction processing. The high-frequency band signal after tonal component screening can generate coding parameters, and the coding parameters are used to represent the target tonal components obtained after tonal component screening. The coding parameters can obtain a coded bitstream through bitstream multiplexing. The information of the target tonal components carried in the coded bitstream obtained in the embodiments of the present application is tonal component screening, so the limited number of coding bits can be efficiently used to obtain a better tonal component coding effect, thereby improving the coding quality of the audio signal.
[0267] In some other embodiments of the present application, the tone component screening may further include a quantity screening process, where the audio encoding device performs tone component screening on the information of the candidate tone components in the current frequency region to obtain the information of the target tone components in the current frequency region, including:
[0268] G1. Obtain information about target tonal components in the current frequency region based on information about candidate tonal components in the current frequency region and information about the maximum number of tonal components that can be encoded in the current frequency region.
[0269] Among them, the tone component screening may include quantity screening processing. The audio encoding device can perform quantity screening processing on the information of candidate tone components in the current frequency region. When performing the quantity screening processing, it is also necessary to obtain the maximum number of tone components that can be encoded in the current frequency region. The maximum number of tone components that can be encoded in the current frequency region refers to the maximum number of tone components that can be used for encoding in the current frequency region.
[0270] In some embodiments of the present application, the information on the maximum number of tonal components that can be encoded in the current frequency region includes a preset second value, or the information on the maximum number of tonal components that can be encoded in the current frequency region is determined according to the encoding rate of the current frame.
[0271] The maximum number of tonal components that can be encoded in the current frequency region can be set to a preset second value, that is, the maximum number of tonal components that can be encoded in each frequency region is fixed. Alternatively, the maximum number of tonal components that can be encoded in the current frequency region is determined according to the encoding rate of the current frame, for example, the encoding rate of the current frame is determined, and the encoding rate of the current frame has a corresponding relationship with the maximum number of tonal components that can be encoded in the current frequency region, so the maximum number of tonal components that can be encoded in the current frequency region can be obtained by selecting according to the current encoding rate.
[0272] In some embodiments of the present application, the aforementioned step G1 obtains information about target tone components in the current frequency region according to information about candidate tone components in the current frequency region and information about the maximum number of tone components that can be encoded in the current frequency region, including:
[0273] G11. Select X candidate tone components with the largest energy information or amplitude information among the candidate tone components in the current frequency region according to the information on the maximum number of tone components that can be encoded in the current frequency region, where X is less than or equal to the maximum number of tone components that can be encoded in the current frequency region and is a positive integer.
[0274] Among them, the information on the maximum number of tone components that can be encoded in the current frequency area refers to the maximum value of the number of tone components that can be encoded in the current frequency area. The information on the maximum number of tone components that can be encoded in the current frequency area can be set to a preset second value, or selected according to the encoding rate.
[0275] G12. Determine information about a target tone component in a current frequency region based on information about X candidate tone components, where X represents the number of target tone components in the current frequency region.
[0276] The audio encoding device may directly use the information of the X candidate tone components as the information of the target tone components of the current frequency region, where X represents the number of the target tone components of the current frequency region. Alternatively, the information of the target tone components of the current frequency region is further determined based on the information of the X candidate tone components. For example, the information of the X candidate tone components is subjected to inter-frame continuity correction processing, and the corrected information of the X candidate tone components is used as the information of the target tone components of the current frequency region. Alternatively, the energy information or amplitude information of the X candidate tone components is weighted and adjusted, and the weighted and adjusted information of the X candidate tone components is used as the information of the target tone components of the current frequency region.
[0277] In the aforementioned embodiment, the information of the candidate tone component includes: the amplitude information or energy information of the candidate tone component, and the amplitude information or energy information of the candidate tone component includes: the power spectrum ratio of the candidate tone component.
[0278] The power spectrum ratio of the candidate tone component is the ratio of the power spectrum value of the candidate tone component to the average value of the power spectrum of the current frequency region.
[0279] In the above-mentioned embodiments of the present application, the tonal component screening includes at least one of the following: merging processing, inter-frame continuity correction processing and quantity screening, and there is no order restriction between different processing. For example, a merging process may be performed first to obtain the quantity information, position information, and amplitude information or energy information of the candidate tonal components after merging the current frequency region; then a quantity screening process may be performed on the quantity information, position information, and amplitude information or energy information of the candidate tonal components after merging the current frequency region to obtain the quantity information, position information, and amplitude information or energy information of the candidate tonal components after quantity screening in the current frequency region; finally, an inter-frame continuity correction process may be performed based on the quantity information, position information, and amplitude information or energy information of the candidate tonal components after quantity screening to obtain the quantity information, position information, and amplitude information or energy information of the corrected candidate tonal components in the current frequency region as the result of the tonal component screening.
[0280] Next, a specific application scenario is used for detailed description. The high frequency band corresponding to the high frequency band signal includes at least one frequency region, and a frequency region includes at least one sub-band. Therefore, the current frequency region includes at least one sub-band. According to the quantity information, position information, and amplitude information or energy information of the candidate tone components in the current frequency region, the quantity information, position information, and amplitude or energy information of the target tone components in the current frequency region are obtained. A specific embodiment includes the following steps:
[0281] Step 1: Sort the position information and amplitude information or energy information of the candidate tone components in ascending order of frequency points to obtain a candidate tone component sequence with increasing frequency point numbers.
[0282] The amplitude information or energy information of the candidate tonal components includes the power spectrum ratio of the candidate tonal components.
[0283] The candidate tone component sequence with increasing frequency point numbers includes: position information peak_idx and power spectrum ratio information peak_val arranged in ascending order according to the frequency point sequence.
[0284] Step 2: Merge the candidate tonal components in the same sub-band.
[0285] In the reconstruction algorithm at the decoding end, there is only one tone component in each subband, and this tone component is placed in the middle of the subband. Therefore, if the encoding end detects multiple tone components in a subband, their information needs to be merged before encoding and transmission.
[0286] Merge the position information and power spectrum ratio information arranged in ascending order of frequency points:
[0287] For two candidate tone components with adjacent frequency points, the subband numbers to which they belong are calculated, as shown below:
[0288] band_idx_1=peak_idx[i] / tone_res[p], i∈[1, peak_cnt-1],
[0289] band_idx_2=peak_idx[i-1] / tone_res[p], i∈[1, peak_cnt-1].
[0290] Among them, peak_idx[i] and peak_idx[i-1] are the position information of the i-th and i-1-th candidate tone components respectively, band_idx_1 and band_idx_2 are the subband numbers corresponding to the i-th and i-1-th candidate tone components respectively, tone_res[p] is the subband width of the p-th frequency region (tile), and in the embodiment of the present application, a subband can contain 16 frequency points, that is, under the sampling rate of 48kHz and the modified discrete cosine transform (MDCT) of 2048 points, the subband width is 375Hz.
[0291] When band_idx_1 and band_idx_2 are the same, it is determined that the i-th candidate tone component and the i-1-th candidate tone component are located in the same sub-band and need to be merged.
[0292] An example of the merging algorithm is as follows: the power spectrum ratio of the i-th candidate tone component is merged into the i-1-th candidate tone component, and the power spectrum ratio information and position information of the i-th candidate tone component are cleared. An example is as follows:
[0293] peak_val[i-1]=peak_val[i-1]+peak_val[i],
[0294] peak_val[i]=0, peak_idx[i]=0.
[0295] After the ith candidate tone component is merged with the i-1th candidate tone component, the information of the i+1th to peak_cnt-1th candidate tone components (sorting starts from 0) is moved forward, and peak_cnt is reduced by 1.
[0296] After the above merging process, the number of candidate tone components finally obtained is recorded as peak_cnt_refine, and the updated position information peak_idx and power spectrum ratio information peak_val are used as the position information and amplitude information or energy information of the candidate tone components after merging in the current frequency region.
[0297] Step 3: Rearrange the candidate tone component sequences in the order of decreasing power spectrum ratio.
[0298] The candidate tone component sequence includes: the updated position information peak_idx and power spectrum ratio information peak_val obtained in step 2.
[0299] Step 4: Clear the information of candidate tone components exceeding a certain number, and only retain the first MAX_TONEPERTILE candidate tone components with the largest power spectrum ratio, that is, perform quantity screening. In the embodiment of the present application, MAX_TONEPERTILE is set to 3.
[0300] If the peak_cnt_refine obtained in step 2 is less than or equal to MAX_TONEPERTILE, no clearing is required.
[0301] The quantity information of the candidate tone components retained in step four is used as the quantity information of the candidate tone components after quantity screening, the position information of the candidate tone components retained in step four is used as the position information of the candidate tone components after quantity screening, and the power spectrum ratio of the candidate tone components retained in step four is used as the amplitude information or energy information after quantity screening.
[0302] Step 5: Rearrange the candidate tone component sequence in ascending order of frequency.
[0303] The candidate tone component sequence includes: the position information peak_idx and the power spectrum ratio information peak_val obtained in step 4 after the quantity screening.
[0304] Step 6: Detect the tonal components at the sub-band edge to ensure the continuity of reconstruction at the decoding end.
[0305] Among them, some candidate tone components may be located at the edge of the sub-band, and their position information may not belong to the same sub-band in consecutive frames. Therefore, it is necessary to divide the candidate tone components located at the edge of the sub-band into the same sub-band. If their positions are judged as different sub-bands, it will cause discontinuity and frequency jumping of the tone components reconstructed at the decoding end.
[0306] Detecting and correcting the candidate tonal components at the subband edge is also called inter-frame continuity correction processing. The specific algorithm is described as follows:
[0307] Assume that the position information sequences of the candidate tonal components of the current frame and the previous frame are peak_idx and last_peak_idx respectively, and calculate the subband sequence number to which the i-th candidate tonal component of the current frame and the previous frame belongs respectively:
[0308] band_idx_cur=peak_idx[i] / tone_res[p],
[0309] band_idx_last=last_peak_idx[i] / tone_res[p].
[0310] When the following conditions are met, the peak_idx of the current frame is corrected:
[0311] |peak_idx[i]-last_peak_idx[i]|==1&band_idx_cur! =band_idx_last.
[0312] When the position of the i-th candidate tone component of the current frame differs from the position of the i-th candidate tone component of the previous frame by 1 and they belong to different subbands, the position information peak_idx of the current frame is corrected. The specific processing process of the correction is as follows:
[0313] peak_idx[i]=last_peak_idx[i].
[0314] After the inter-frame continuity correction process, the position information of the candidate pitch component of the previous frame needs to be updated, that is, last_peak_idx is updated to peak_idx.
[0315] After the tone component screening is performed, the quantity information of the tone components can be obtained. In this specific embodiment, the number of tone components of the current tile is recorded as tone_cnt[p]:
[0316] tone_cnt[p]=peak_cnt_refine.
[0317] After the tonal component is screened, the amplitude information or energy information of the tonal component can be obtained. In the embodiment of the present application, the energy information of the tonal component is expressed as an equivalent MDCT spectrum energy, and the calculation method is as follows:
[0318] toneEnergyR[i]=mean_powerspecR*(powerSpectrum[index] / mean_powerspec).
[0319] Among them, mean_powerspecR is the average MDCT energy of the current tile, mean_powerspec is the average power spectrum of the current tile, powerSpectrum[index] is the power spectrum of the i-th tone component, index is the frequency position of the i-th tone component, and toneEnergyR[i] is the equivalent MDCT energy of the i-th tone component.
[0320] The MDCT energy average mean_powerspecR of the current tile is calculated as follows:
[0321]
[0322] Among them, mdctSpectrum is the signal mdct spectrum, tile_width is the tile width (ie, the number of frequency points), and mean_powerspecR is the MDCT energy average.
[0323] Finally, based on the quantity information of the tone components in the current frequency region, the position information of the tone components, and the amplitude or energy information of the tone components, the position quantity parameters of the tone components in the current frequency region, and the amplitude parameters or energy parameters of the tone components are determined.
[0324] It can be seen from the above examples that the tone component screening provided in the embodiments of the present application not only takes into account the energy or amplitude of the tone components and the maximum number of tone components that can be encoded, but also takes into account the continuity of the tone components between adjacent frames and the sub-band distribution of the tone components, and efficiently utilizes the limited number of coding bits to obtain better tone component coding effects and improve coding quality.
[0325] The above embodiment introduces the audio encoding method performed by the audio encoding device. Next, the audio decoding method performed by the audio decoding device provided in the embodiment of the present application is introduced. Fig. 9 As shown, it mainly includes the following steps:
[0326] 901. Obtain a coded bitstream.
[0327] The encoded code stream is sent from the audio encoding device to the audio decoding device.
[0328] 902. Demultiplex the encoded code stream to obtain a first encoding parameter of a current frame of the audio signal and a second encoding parameter of the current frame, where the second encoding parameter of the current frame includes a high frequency band parameter of the current frame.
[0329] The first encoding parameter and the second encoding parameter may refer to the encoding method, which will not be described in detail here.
[0330] 903. Obtain a first high-frequency band signal of the current frame and a first low-frequency band signal of the current frame according to the first encoding parameter.
[0331] The first high-band signal may include at least one of a decoded high-band signal obtained by directly decoding according to the first coding parameter and an extended high-band signal obtained by performing frequency band extension on the first low-band signal.
[0332] 904. Obtain a second high-frequency band signal of the current frame according to the second encoding parameter, where the second high-frequency band signal includes a reconstructed tone signal.
[0333] The second coding parameter includes the high frequency band parameter of the current frame. The high frequency band parameter may include the tone component information of the high frequency band signal. For example, the high frequency band parameter of the current frame includes the position and quantity parameters of the tone component, and the amplitude parameter or energy parameter of the tone component. For another example, the high frequency band parameter of the current frame includes the position parameter, the quantity parameter, and the amplitude parameter or energy parameter of the tone component. The high frequency band parameter of the current frame may refer to the coding method, and will not be described in detail herein.
[0334] Similar to the processing flow method at the encoding end, the process of obtaining the reconstructed high-frequency band signal of the current frame according to the high-frequency band parameters in the processing flow at the decoding end will also be carried out according to the frequency region division and / or sub-band division of the high-frequency band. The high-frequency band corresponding to the high-frequency band signal includes at least one frequency region, and one of the frequency regions includes at least one sub-band. The number of frequency regions of the high-frequency band parameters that need to be determined can be predetermined or obtained from the bit stream. Here, a further description is given by taking the example of obtaining the reconstructed high-frequency band signal of the current frame according to the position number parameter of the tone component and the amplitude parameter of the tone component in a frequency region. Specifically, it can be:
[0335] Determining the position of the tone component in the current frequency region according to the position quantity parameter of the tone component in the current frequency region;
[0336] Determining the amplitude or energy corresponding to the position of the tone component according to the amplitude parameter or energy parameter of the tone component in the current frequency region;
[0337] Obtaining a reconstructed tone signal according to the position of the tone component in the current frequency region and the amplitude or energy corresponding to the position of the tone component;
[0338] The reconstructed high-frequency band signal is obtained according to the reconstructed tone signal.
[0339] 905 . Obtain a decoded signal of the current frame according to the first low-frequency band signal, the first high-frequency band signal, and the second high-frequency band signal of the current frame.
[0340] In the embodiment of the present application, the tone component selection and encoding method are performed at the encoding end, which not only considers the peak energy or amplitude and the maximum number of tone components that can be encoded, but also considers the continuity of the tone components between adjacent frames and the sub-band distribution of the tone components, and efficiently utilizes the limited number of coding bits to obtain a better tone component encoding effect and improve the encoding quality. At the corresponding decoding end, the high-frequency band signal to be decoded is screened by the tone components, so the decoding efficiency is correspondingly improved.
[0341] It should be noted that, for the aforementioned method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the described order of actions, because according to the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present application.
[0342] In order to better implement the above-mentioned solution of the embodiment of the present application, relevant devices for implementing the above-mentioned solution are also provided below.
[0343] See also Fig.10 As shown, an audio encoding device 1000 provided in an embodiment of the present application may include: an acquisition module 1001, an encoding module 1002, and a code stream multiplexing module 1003, wherein:
[0344] An acquisition module, used for acquiring a current frame of an audio signal, wherein the current frame includes a high frequency band signal;
[0345] A coding module, used for coding the high frequency band signal to obtain coding parameters of the current frame, wherein the coding includes: tone component screening; the coding parameters are used to represent information of a target tone component of the high frequency band signal, wherein the target tone component is obtained after the tone component screening, and the tone component information includes position information, quantity information, and amplitude information or energy information of the tone component;
[0346] The code stream multiplexing module is used to perform code stream multiplexing on the encoding parameters to obtain an encoded code stream.
[0347] In some embodiments of the present application, the high frequency band corresponding to the high frequency band signal includes at least one frequency region, and the at least one frequency region includes the current frequency region;
[0348] The encoding module is used to obtain information about candidate tone components of the current frequency region based on a high-frequency band signal of the current frequency region; perform tone component screening on the information about candidate tone components of the current frequency region to obtain information about target tone components of the current frequency region; and obtain encoding parameters of the current frequency region based on the information about the target tone components of the current frequency region.
[0349] In some embodiments of the present application, the high frequency band corresponding to the high frequency band signal includes at least one frequency region, and the at least one frequency region includes the current frequency region;
[0350] The encoding module is used to perform peak search based on the high-frequency band signal of the current frequency region to obtain peak information of the current frequency region, wherein the peak information of the current frequency region includes: peak quantity information, peak position information, and peak energy information or peak amplitude information of the current frequency region; perform peak screening on the peak information of the current frequency region to obtain information on candidate tone components of the current frequency region; perform tone component screening on the information on candidate tone components of the current frequency region to obtain information on target tone components of the current frequency region; and obtain encoding parameters of the current frequency region based on the information on target tone components of the current frequency region.
[0351] In some embodiments of the present application, the current frequency region includes at least one sub-band, and the at least one sub-band includes the current sub-band;
[0352] The encoding module is used to merge the candidate tone components with the same sub-band number in the current frequency region to obtain information about the merged candidate tone components; and obtain information about the target tone components in the current frequency region based on the information about the merged candidate tone components in the current frequency region.
[0353] In some embodiments of the present application, the at least one subband includes a current subband;
[0354] The information of the merged candidate tone components of the current frequency region includes: position information of the merged candidate tone components of the current sub-band, and amplitude information or energy information of the merged candidate tone components of the current sub-band;
[0355] The position information of the candidate tone components after the merging process of the current sub-band includes: the position information of one candidate tone component among the candidate tone components before the merging process of the current sub-band;
[0356] The amplitude information or energy information of the candidate tone components after the merging process of the current sub-band includes: the amplitude information or energy information of the one candidate tone component, or the amplitude information or energy information of the candidate tone components after the merging process of the current sub-band is calculated based on the amplitude information or energy information of the candidate tone components before the merging process of the current sub-band.
[0357] In some embodiments of the present application, the information of the candidate tone components after the merging process of the current frequency region further includes: information on the quantity of the candidate tone components after the merging process of the current frequency region;
[0358] The information on the number of candidate tone components after the merging process in the current frequency region is the same as the information on the number of subbands having the candidate tone components in the current frequency region.
[0359] In some embodiments of the present application, the encoding module is used to arrange the candidate tone components of the current frequency region in ascending or descending positions according to the position information of the candidate tone components of the current frequency region before merging the candidate tone components with the same sub-band sequence number in the current frequency region, so as to obtain the candidate tone components after position arrangement in the current frequency region;
[0360] The encoding module is used to merge the candidate tone components with the same sub-band sequence number in the current frequency region according to the candidate tone components arranged in positions in the current frequency region.
[0361] In some embodiments of the present application, the encoding module is used to obtain information about target tone components in the current frequency region based on information about candidate tone components after merging processing in the current frequency region and information about the maximum number of tone components that can be encoded in the current frequency region.
[0362] In some embodiments of the present application, the encoding module is used to arrange the candidate tone components after merging processing of the current frequency region according to energy information or amplitude information to obtain information of the candidate tone components after arrangement with energy information or amplitude information; and obtain information of the target tone components of the current frequency region according to the information of the candidate tone components after arrangement with energy information or amplitude information and the information of the maximum number of tone components that can be encoded in the current frequency region.
[0363] In some embodiments of the present application, the encoding module is used to obtain information about candidate tone components after quantity screening in the current frequency region based on information about candidate tone components after merging processing in the current frequency region and information about the maximum number of tone components that can be encoded in the current frequency region; and obtain information about target tone components in the current frequency region based on information about candidate tone components after quantity screening in the current frequency region.
[0364] In some embodiments of the present application, the encoding module is used to arrange the candidate tone components after the merger processing of the current frequency region according to energy information or amplitude information to obtain the information of the candidate tone components after the arrangement of the energy information or amplitude information; according to the information of the candidate tone components after the arrangement of the energy information or amplitude information and the information of the maximum number of tone components that can be encoded in the current frequency region, obtain the information of the candidate tone components after the number of the current frequency region of the current frame is screened.
[0365] In some embodiments of the present application, the encoding module is used to arrange the candidate tone components after the number of current frequency regions of the current frame is filtered in ascending or descending positions according to the position information of the candidate tone components after the number of current frequency regions of the current frame is filtered, so as to obtain the candidate tone components after the position arrangement in the current frequency region of the current frame; obtain the subband sequence number corresponding to the candidate tone components after the number of current frequency regions of the current frame is filtered and sorted according to the candidate tone components after the number of current frequency regions of the current frame; obtain the subband sequence number corresponding to the candidate tone components after the number of current frequency regions of the previous frame of the current frame is filtered and sorted; if the number of current frequency regions of the current frame is filtered and sorted If the position information of the nth candidate tone component after the position sorting and the position information of the nth candidate tone component after the position sorting after the number of current frequency areas of the previous frame meet the preset conditions, and the subband sequence number corresponding to the nth candidate tone component after the position sorting after the number of current frequency areas of the current frame is different from the subband sequence number corresponding to the nth candidate tone component after the position sorting after the number of current frequency areas of the previous frame, then the position information of the nth candidate tone component after the position sorting after the number of current frequency areas of the current frame is corrected to obtain the information of the target tone component of the frequency area, and the nth candidate tone component is any candidate tone component after the position sorting after the number screening in the current frequency area.
[0366] In some embodiments of the present application, the preset condition includes: the difference between the position information of the nth candidate tone component after position sorting after the number of current frequency regions of the current frame is filtered and the position information of the nth candidate tone component after position sorting after the number of current frequency regions of the previous frame is filtered is less than or equal to a preset threshold.
[0367] In some embodiments of the present application, the encoding module is used to correct the position information of the nth candidate tone component after the position is sorted after the number of current frequency regions of the current frame is screened to the position information of the nth candidate tone component after the position is sorted after the number of current frequency regions of the previous frame is screened.
[0368] In some embodiments of the present application, the current frequency region includes at least one subband, and the at least one subband includes the current subband; the encoding module is used to merge the candidate tone components with the same subband number in the current frequency region to obtain information on the target tone components of the current frequency region.
[0369] In some embodiments of the present application, the current frequency region includes at least one subband, and the encoding module is used to obtain the subband sequence number corresponding to the candidate tone component in the current frequency region of the current frame according to the position information of the candidate tone component in the current frequency region of the current frame; obtain the subband sequence number corresponding to the candidate tone component in the current frequency region of the previous frame of the current frame; if the position information of the nth candidate tone component in the current frequency region of the current frame and the position information of the nth candidate tone component in the current frequency region of the previous frame meet a preset condition, and the subband sequence number corresponding to the nth candidate tone component in the current frequency region of the current frame and the subband sequence number corresponding to the nth candidate tone component in the current frequency region of the previous frame are different, then the position information of the nth candidate tone component in the current frequency region of the current frame is corrected to obtain the information of the target tone component in the current frequency region, and the nth candidate tone component is any candidate tone component in the current frequency region.
[0370] In some embodiments of the present application, the encoding module is used to arrange the candidate tone components in the current frequency region of the current frame in ascending or descending positions according to the position information of the candidate tone components in the current frequency region of the current frame to obtain the arranged candidate tone components in the current frequency region of the current frame; and obtain the subband sequence number corresponding to the candidate tone components in the current frequency region of the current frame according to the arranged candidate tone components in the current frequency region.
[0371] In some embodiments of the present application, the preset condition includes: the difference between the position information of the nth candidate tone component in the current frequency region of the current frame and the position information of the nth candidate tone component in the current frequency region of the previous frame is less than or equal to a preset threshold.
[0372] In some embodiments of the present application, the encoding module is used to correct the position information of the nth candidate tone component in the current frequency region of the current frame to the position information of the nth candidate tone component in the current frequency region of the previous frame.
[0373] In some embodiments of the present application, the encoding module is used to obtain information about target tone components in the current frequency region based on information about candidate tone components in the current frequency region and information about the maximum number of tone components that can be encoded in the current frequency region.
[0374] In some embodiments of the present application, the encoding module is used to select X candidate tone components with the largest energy information or amplitude information among the candidate tone components in the current frequency region based on the information on the maximum number of tone components that can be encoded in the current frequency region, where X is less than or equal to the maximum number of tone components that can be encoded in the current frequency region, and X is a positive integer; and determine that the information of the X candidate tone components is the information of the target tone components of the current frequency region, where X represents the number of target tone components in the current frequency region.
[0375] In some embodiments of the present application, the information of the candidate tone component includes: amplitude information or energy information of the candidate tone component, and the amplitude information or energy information of the candidate tone component includes: power spectrum ratio of the candidate tone component, wherein the power spectrum ratio of the candidate tone component is the ratio of the value of the power spectrum of the candidate tone component to the average value of the power spectrum of the current frequency region.
[0376] Through the examples of the aforementioned embodiments, it can be known that the current frame of the audio signal is obtained, the current frame includes a high-frequency band signal, the high-frequency band signal is encoded to obtain the encoding parameters of the current frame, and the encoding includes: tone component screening; the encoding parameters are used to represent the information of the target tone component of the high-frequency band signal, the target tone component is obtained after the tone component screening, the tone component information includes the position information, quantity information, and amplitude information or energy information of the tone component, and the encoding parameters are multiplexed to obtain the encoded bitstream. In the embodiment of the present application, the encoding process includes tone component screening, and the encoding parameters are used to represent the target tone component obtained after the tone component screening. The encoding parameters can obtain the encoded bitstream through bitstream multiplexing. The information of the target tone component carried in the encoded bitstream obtained in the embodiment of the present application is filtered by the tone component, so the limited number of encoding bits can be efficiently used to obtain a better tone component encoding effect, thereby improving the encoding quality of the audio signal.
[0377] It should be noted that the information interaction, execution process, etc. between the modules / units of the above-mentioned device are based on the same concept as the method embodiment of the present application, and the technical effects they bring are the same as those of the method embodiment of the present application. For specific contents, please refer to the description in the method embodiment shown above in the present application, and will not be repeated here.
[0378] Based on the same inventive concept as the above method, an embodiment of the present application provides an audio signal encoder, which is used to encode an audio signal, including: an encoder as described in one or more of the above embodiments, wherein the audio encoding device is used to encode and generate a corresponding bit stream.
[0379] Based on the same inventive concept as the above method, the present application embodiment provides a device for encoding an audio signal, for example, an audio encoding device, see Fig.11 As shown, the audio encoding device 1100 includes:
[0380] processor 1101, memory 1102 and communication interface 1103 (wherein the number of processors 1101 in the audio encoding device 1100 may be one or more, Fig.11 In some embodiments of the present application, the processor 1101, the memory 1102 and the communication interface 1103 may be connected via a bus or other means, wherein: Fig.11 The example of connecting through bus is taken in the following.
[0381] The memory 1102 may include a read-only memory and a random access memory, and provides instructions and data to the processor 1101. A portion of the memory 1102 may also include a non-volatile random access memory (NVRAM). The memory 1102 stores an operating system and operating instructions, executable modules or data structures, or a subset thereof, or an extended set thereof, wherein the operating instructions may include various operating instructions for implementing various operations. The operating system may include various system programs for implementing various basic services and processing hardware-based tasks.
[0382] The processor 1101 controls the operation of the audio encoding device, and the processor 1101 may also be referred to as a central processing unit (CPU). In a specific application, the various components of the audio encoding device are coupled together through a bus system, wherein the bus system may include a power bus, a control bus, and a status signal bus in addition to a data bus. However, for the sake of clarity, various buses are referred to as bus systems in the figure.
[0383] The method disclosed in the above embodiment of the present application can be applied to the processor 1101, or implemented by the processor 1101. The processor 1101 can be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the hardware integrated logic circuit or software instructions in the processor 1101. The above processor 1101 can be a general processor, a digital signal processor (digital signal processing, DSP), an application specific integrated circuit (application specific integrated circuit, ASIC), a field programmable gate array (field-programmable gate array, FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of the present application can be implemented or executed. The general processor can be a microprocessor or the processor can also be any conventional processor, etc. The steps of the method disclosed in the embodiment of the present application can be directly embodied as a hardware decoding processor to execute, or the hardware and software modules in the decoding processor can be executed. The software module can be located in a mature storage medium in the field such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory 1102, and the processor 1101 reads the information in the memory 1102 and completes the steps of the above method in combination with its hardware.
[0384] The communication interface 1103 may be used to receive or send digital or character information, and may be, for example, an input / output interface, a pin or a circuit, etc. For example, the above-mentioned encoding code stream is sent via the communication interface 1103 .
[0385] Based on the same inventive concept as the above method, an embodiment of the present application provides an audio encoding device, comprising: a non-volatile memory and a processor coupled to each other, wherein the processor calls a program code stored in the memory to execute part or all of the steps of the audio signal encoding method described in one or more of the above embodiments.
[0386] Based on the same inventive concept as the above method, an embodiment of the present application provides a computer-readable storage medium, which stores program code, wherein the program code includes instructions for executing part or all of the steps of the audio signal encoding method described in one or more of the above embodiments.
[0387] Based on the same inventive concept as the above method, an embodiment of the present application provides a computer program product. When the computer program product is run on a computer, the computer executes part or all of the steps of the audio signal encoding method described in one or more embodiments above.
[0388] The processor mentioned in the above embodiments can be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method embodiment can be completed by the hardware integrated logic circuit or software instructions in the processor. The processor can be a general-purpose processor, a digital signal processor (digital signal processor, DSP), an application-specific integrated circuit (application-specific integrated circuit, ASIC), a field programmable gate array (field programmable gate array, FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc. The steps of the method disclosed in the embodiment of the present application can be directly embodied as a hardware coding processor to be executed, or the hardware and software modules in the coding processor are combined and executed. The software module can be located in a mature storage medium in the field such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory, and the processor reads the information in the memory and completes the steps of the above method in combination with its hardware.
[0389] The memory mentioned in the above embodiments may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memories. Among them, the non-volatile memory may 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. The volatile memory may be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), and direct RAM (DR RAM). It should be noted that the memory of the systems and methods described herein is intended to include, but is not limited to, these and any other suitable types of memory.
[0390] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0391] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0392] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0393] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0394] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0395] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium and includes several instructions for a computer device (personal computer, server, or network device, etc.) to perform all or part of the steps of the methods described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as USB flash drives, mobile hard disks, read-only memories (ROM), random access memories (RAM), magnetic disks or optical disks.
[0396] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. An audio encoding method, characterized in that: The method comprises: Acquire a current frame of an audio signal, wherein the current frame includes a high-frequency band signal; Encoding the high-frequency band signal to obtain encoding parameters of the current frame, wherein the encoding includes: tone component screening; the encoding parameters are used to represent information of a target tone component of the high-frequency band signal, wherein the target tone component is obtained after the tone component screening, and the tone component information includes position information, quantity information, and amplitude information or energy information of the tone component; Performing code stream multiplexing on the encoding parameters to obtain an encoded code stream; The high frequency band corresponding to the high frequency band signal includes at least one frequency region, and the at least one frequency region includes the current frequency region; The step of encoding the high frequency band signal to obtain the encoding parameter of the current frame includes: Performing a peak search according to the high frequency band signal of the current frequency region to obtain peak information of the current frequency region, wherein the peak information of the current frequency region includes: peak quantity information, peak position information, and peak energy information or peak amplitude information of the current frequency region; Performing peak screening on the peak information of the current frequency region to obtain information on candidate tone components of the current frequency region; Performing tone component screening on the information of candidate tone components in the current frequency region to obtain information of target tone components in the current frequency region; The encoding parameter of the current frequency region is obtained according to the information of the target pitch component of the current frequency region.
2. The method according to claim 1, characterized in that The current frequency region includes at least one sub-band; The step of screening the information of candidate tone components in the current frequency region to obtain information of target tone components in the current frequency region includes: Merging candidate tone components having the same sub-band sequence number in the current frequency region to obtain information of merged candidate tone components in the current frequency region; The information of the target tone component of the current frequency region is obtained according to the information of the candidate tone components after the merging process of the current frequency region.
3. The method according to claim 2, characterized in that The at least one subband includes a current subband; The information of the merged candidate tone components of the current frequency region includes: position information of the merged candidate tone components of the current sub-band, and amplitude information or energy information of the merged candidate tone components of the current sub-band; The position information of the candidate tone components after the merging process of the current sub-band includes: the position information of one candidate tone component among the candidate tone components before the merging process of the current sub-band; The amplitude information or energy information of the candidate tone components after the merging process of the current sub-band includes: the amplitude information or energy information of the one candidate tone component, or the amplitude information or energy information of the candidate tone components after the merging process of the current sub-band is calculated based on the amplitude information or energy information of the candidate tone components before the merging process of the current sub-band.
4. The method according to claim 3, characterized in that The information of the candidate tone components after the merging process of the current frequency region further includes: the quantity information of the candidate tone components after the merging process of the current frequency region; The information on the number of candidate tone components after the merging process in the current frequency region is the same as the information on the number of subbands having the candidate tone components in the current frequency region.
5. The method according to claim 3 or 4, characterized in that: Before merging the candidate tone components having the same sub-band sequence number in the current frequency region, the method further comprises: Arranging the candidate tone components of the current frequency region in ascending or descending positions according to the position information of the candidate tone components of the current frequency region, so as to obtain the candidate tone components of the current frequency region after position arrangement; The merging process of the candidate tone components with the same sub-band sequence number in the current frequency region includes: According to the candidate tone components arranged in positions in the current frequency region, candidate tone components with the same sub-band sequence number in the current frequency region are merged.
6. The method according to claim 3 or 4, characterized in that: The obtaining the information of the target tone component of the current frequency region according to the information of the candidate tone components after the merging process of the current frequency region comprises: The information of the target tone component of the current frequency region is obtained according to the information of the candidate tone components after the merging process in the current frequency region and the information of the maximum number of tone components that can be encoded in the current frequency region.
7. The method according to claim 6, characterized in that The obtaining, according to the information of the candidate tone components after the merging process of the current frequency region and the information of the maximum number of tone components that can be encoded in the current frequency region, the information of the target tone components in the current frequency region comprises: Arrange the candidate tone components after the merging process of the current frequency region according to the energy information or the amplitude information to obtain the information of the candidate tone components after the energy information or the amplitude information is arranged; The information of the target tone component in the current frequency region is obtained according to the information of the candidate tone components arranged by the energy information or the amplitude information and the information of the maximum number of tone components that can be encoded in the current frequency region.
8. The method according to claim 3 or 4, characterized in that: The obtaining the information of the target tone component of the current frequency region according to the information of the candidate tone components after the merging process of the current frequency region comprises: According to the information of the candidate tone components after the merging process in the current frequency region and the information of the maximum number of tone components that can be encoded in the current frequency region, obtaining the information of the candidate tone components after the number screening in the current frequency region; According to the information of the candidate tone components screened according to the number of the current frequency region, the information of the target tone component of the current frequency region is obtained.
9. The method according to claim 8, characterized in that The obtaining, according to the information of the candidate tone components after the merging process of the current frequency region and the information of the maximum number of tone components that can be encoded in the current frequency region, the information of the candidate tone components after the number of the current frequency region of the current frame is screened includes: Arrange the candidate tone components after the merging process of the current frequency region according to the energy information or the amplitude information to obtain the information of the candidate tone components after the energy information or the amplitude information is arranged; According to the information of the candidate tone components arranged after the energy information or amplitude information and the information of the maximum number of tone components that can be encoded in the current frequency region, the information of the candidate tone components after the number of the current frequency region of the current frame is obtained.
10. The method according to claim 9, characterized in that The obtaining the information of the target tone component of the current frequency region by filtering the candidate tone components according to the number of the current frequency region includes: Arranging the candidate tone components after the number of current frequency regions of the current frame is filtered in ascending or descending positions according to the position information of the candidate tone components after the number of current frequency regions of the current frame is filtered, so as to obtain the candidate tone components after the number of current frequency regions of the current frame is filtered and arranged in positions; According to the candidate tone components that are arranged after the number of current frequency regions of the current frame is filtered, obtaining the subband sequence numbers corresponding to the candidate tone components that are arranged after the number of current frequency regions of the current frame is filtered; Obtaining the subband sequence number corresponding to the candidate tone components after the number of the current frequency region of the previous frame of the current frame is screened and the positions are sorted; If the position information of the nth candidate tone component after the position sorting after the number of current frequency areas of the current frame and the position information of the nth candidate tone component after the position sorting after the number of current frequency areas of the previous frame meet the preset conditions, and the subband sequence number corresponding to the nth candidate tone component after the position sorting after the number of current frequency areas of the current frame and the subband sequence number corresponding to the nth candidate tone component after the position sorting after the number of current frequency areas of the previous frame are different, then the position information of the nth candidate tone component after the position sorting after the number of current frequency areas of the current frame is corrected to obtain the information of the target tone component of the current frequency area, and the nth candidate tone component is any candidate tone component after the position sorting after the number of current frequency areas.
11. The method according to claim 10, characterized in that The preset conditions include: the difference between the position information of the nth candidate tone component after position sorting after the number of current frequency areas of the current frame is filtered and the position information of the nth candidate tone component after position sorting after the number of current frequency areas of the previous frame is filtered is less than or equal to a preset threshold.
12. The method according to claim 10, characterized in that The step of modifying the position information of the nth candidate tone component after the position sorting after the number of the current frequency region of the current frame is screened includes: The position information of the nth candidate tone component after the position sorting after the number of current frequency regions of the current frame is corrected to the position information of the nth candidate tone component after the position sorting after the number of current frequency regions of the previous frame is filtered.
13. The method according to claim 1, characterized in that The current frequency region includes at least one sub-band; The step of screening the information of candidate tone components in the current frequency region to obtain information of target tone components in the current frequency region includes: The candidate tone components with the same sub-band sequence number in the current frequency region are merged to obtain information of the target tone component in the current frequency region.
14. The method according to claim 1, characterized in that The current frequency region includes at least one sub-band, and the step of screening the information of candidate tone components of the current frequency region to obtain information of target tone components of the current frequency region includes: Obtaining, according to the position information of the candidate tone components in the current frequency region of the current frame, the subband sequence number corresponding to the candidate tone components in the current frequency region of the current frame; Obtaining a subband sequence number corresponding to a candidate tone component in a current frequency region of a frame previous to the current frame; If the position information of the nth candidate tone component of the current frequency region of the current frame and the position information of the nth candidate tone component of the current frequency region of the previous frame meet the preset conditions, and the subband sequence number corresponding to the nth candidate tone component of the current frequency region of the current frame and the subband sequence number corresponding to the nth candidate tone component of the current frequency region of the previous frame are different, the position information of the nth candidate tone component of the current frequency region of the current frame is corrected to obtain the information of the target tone component of the current frequency region, and the nth candidate tone component is any candidate tone component in the current frequency region.
15. The method according to claim 14, characterized in that The obtaining, according to the position information of the candidate tone components in the current frequency region of the current frame, the subband sequence number corresponding to the candidate tone components in the current frequency region of the current frame comprises: Arrange the candidate tone components in the current frequency region of the current frame in ascending or descending positions according to the position information of the candidate tone components in the current frequency region of the current frame to obtain the candidate tone components in the current frequency region of the current frame after position arrangement; According to the candidate tone components after position arrangement in the current frequency region, the subband sequence numbers corresponding to the candidate tone components in the current frequency region of the current frame are obtained.
16. The method according to claim 15, characterized in that The preset condition includes: a difference between the position information of the nth candidate tone component in the current frequency region of the current frame and the position information of the nth candidate tone component in the current frequency region of the previous frame is less than or equal to a preset threshold.
17. The method according to claim 15 or 16, characterized in that The modifying of the position information of the nth candidate tone component in the current frequency region of the current frame includes: The position information of the nth candidate tone component in the current frequency region of the current frame is corrected to the position information of the nth candidate tone component in the current frequency region of the previous frame.
18. The method according to claim 1, characterized in that The step of screening the information of candidate tone components in the current frequency region to obtain information of target tone components in the current frequency region includes: According to the information of the candidate tonal components in the current frequency region and the information of the maximum number of tonal components that can be encoded in the current frequency region, the information of the target tonal components in the current frequency region is obtained.
19. The method according to claim 18, characterized in that The obtaining, according to the information of the candidate tone components of the current frequency region and the information of the maximum number of tone components that can be encoded in the current frequency region, the information of the target tone components of the current frequency region comprises: Selecting, according to the information of the maximum number of tonal components that can be encoded in the current frequency region, X candidate tonal components with the largest energy information or amplitude information of the candidate tonal components in the current frequency region, where X is less than or equal to the maximum number of tonal components that can be encoded in the current frequency region, and X is a positive integer; The information of the X candidate tone components is determined as the information of the target tone components in the current frequency region, where X represents the number of the target tone components in the current frequency region.
20. The method according to any one of claims 1, 3, 4, 7, 9, 11, 12, 15, 16 and 19, characterized in that The information of the candidate tone component includes: amplitude information or energy information of the candidate tone component, and the amplitude information or energy information of the candidate tone component includes: power spectrum ratio of the candidate tone component, wherein the power spectrum ratio of the candidate tone component is the ratio of the power spectrum value of the candidate tone component to the average value of the power spectrum of the current frequency region.
21. An audio encoding device, characterized in that: The device comprises: An acquisition module, used for acquiring a current frame of an audio signal, wherein the current frame includes a high frequency band signal; A coding module, used for coding the high frequency band signal to obtain coding parameters of the current frame, wherein the coding includes: tone component screening; the coding parameters are used to represent information of a target tone component of the high frequency band signal, wherein the target tone component is obtained after the tone component screening, and the tone component information includes position information, quantity information, and amplitude information or energy information of the tone component; A code stream multiplexing module, used for performing code stream multiplexing on the encoding parameters to obtain an encoded code stream; The high frequency band corresponding to the high frequency band signal includes at least one frequency region, and the at least one frequency region includes the current frequency region; The encoding module is used to perform peak search based on the high-frequency band signal of the current frequency region to obtain peak information of the current frequency region, wherein the peak information of the current frequency region includes: peak quantity information, peak position information, and peak energy information or peak amplitude information of the current frequency region; perform peak screening on the peak information of the current frequency region to obtain information on candidate tone components of the current frequency region; perform tone component screening on the information on candidate tone components of the current frequency region to obtain information on target tone components of the current frequency region; and obtain encoding parameters of the current frequency region based on the information on target tone components of the current frequency region.
22. The device according to claim 21, characterized in that The current frequency region includes at least one sub-band; The encoding module is used to merge the candidate tone components with the same sub-band sequence number in the current frequency region to obtain information of the merged candidate tone components in the current frequency region; The information of the target tone component of the current frequency region is obtained according to the information of the candidate tone components after the merging process of the current frequency region.
23. The device according to claim 22, characterized in that The at least one subband includes a current subband; The information of the merged candidate tone components of the current frequency region includes: position information of the merged candidate tone components of the current sub-band, and amplitude information or energy information of the merged candidate tone components of the current sub-band; The position information of the candidate tone components after the merging process of the current sub-band includes: the position information of one candidate tone component among the candidate tone components before the merging process of the current sub-band; The amplitude information or energy information of the candidate tone components after the merging process of the current sub-band includes: the amplitude information or energy information of the one candidate tone component, or the amplitude information or energy information of the candidate tone components after the merging process of the current sub-band is calculated based on the amplitude information or energy information of the candidate tone components before the merging process of the current sub-band.
24. The device according to claim 23, characterized in that The information of the candidate tone components after the merging process of the current frequency region further includes: the quantity information of the candidate tone components after the merging process of the current frequency region; The information on the number of candidate tone components after the merging process in the current frequency region is the same as the information on the number of subbands having the candidate tone components in the current frequency region.
25. The device according to claim 23 or 24, characterized in that The encoding module is configured to, before merging the candidate tone components with the same sub-band sequence number in the current frequency region, arrange the candidate tone components in the current frequency region in ascending or descending positions according to the position information of the candidate tone components in the current frequency region, so as to obtain the candidate tone components in the current frequency region after position arrangement; The encoding module is used to merge the candidate tone components with the same sub-band sequence number in the current frequency region according to the candidate tone components arranged in positions in the current frequency region.
26. The device according to claim 23 or 24, characterized in that The encoding module is used to obtain the information of the target tone component of the current frequency region according to the information of the candidate tone components after the merging process of the current frequency region and the information of the maximum number of tone components that can be encoded in the current frequency region.
27. The device according to claim 26, characterized in that The encoding module is used to arrange the candidate tone components after the merger processing of the current frequency region according to the energy information or the amplitude information, so as to obtain the information of the candidate tone components after the arrangement of the energy information or the amplitude information; and obtain the information of the target tone components in the current frequency region according to the information of the candidate tone components after the arrangement of the energy information or the amplitude information and the information of the maximum number of tone components that can be encoded in the current frequency region.
28. The device according to claim 23 or 24, characterized in that The encoding module is used to obtain the information of the candidate tone components after the number screening of the current frequency region according to the information of the candidate tone components after the merging process of the current frequency region and the information of the maximum number of tone components that can be encoded in the current frequency region; According to the information of the candidate tone components screened according to the number of the current frequency region, the information of the target tone component of the current frequency region is obtained.
29. The device according to claim 28, characterized in that The encoding module is used to arrange the candidate tone components after the merging process of the current frequency region according to the energy information or the amplitude information to obtain the information of the candidate tone components after the arrangement of the energy information or the amplitude information; and obtain the information of the candidate tone components after the number screening of the current frequency region of the current frame according to the information of the candidate tone components after the arrangement of the energy information or the amplitude information and the information of the maximum number of tone components that can be encoded in the current frequency region.
30. The device according to claim 29, characterized in that The encoding module is used to arrange the candidate tone components after the number of current frequency regions of the current frame is filtered in ascending or descending positions according to the position information of the candidate tone components after the number of current frequency regions of the current frame is filtered, so as to obtain the candidate tone components arranged in the positions after the number of current frequency regions of the current frame is filtered; according to the candidate tone components arranged in the positions after the number of current frequency regions of the current frame, obtain the subband sequence numbers corresponding to the candidate tone components after the number of current frequency regions of the current frame is filtered and sorted; obtain the subband sequence numbers corresponding to the candidate tone components after the number of current frequency regions of the previous frame are filtered and sorted; if the number of current frequency regions of the current frame is filtered and sorted If the position information of the nth candidate tone component after the current frame and the position information of the nth candidate tone component after the position sorting after the number of current frequency areas of the previous frame meet the preset conditions, and the subband sequence number corresponding to the nth candidate tone component after the position sorting after the number of current frequency areas of the current frame is different from the subband sequence number corresponding to the nth candidate tone component after the position sorting after the number of current frequency areas of the previous frame, then the position information of the nth candidate tone component after the position sorting after the number of current frequency areas of the current frame is corrected to obtain the information of the target tone component of the current frequency area, and the nth candidate tone component is any candidate tone component after the position sorting after the number of current frequency areas.
31. The device according to claim 30, characterized in that The preset conditions include: the difference between the position information of the nth candidate tone component after position sorting after the number of current frequency areas of the current frame is filtered and the position information of the nth candidate tone component after position sorting after the number of current frequency areas of the previous frame is filtered is less than or equal to a preset threshold.
32. The device according to claim 30, characterized in that The encoding module is used to correct the position information of the nth candidate tone component after the number of current frequency areas of the current frame is screened and the position is sorted to the position information of the nth candidate tone component after the number of current frequency areas of the previous frame is screened and the position is sorted.
33. The device according to claim 21, characterized in that The current frequency region includes at least one sub-band; The encoding module is used to merge the candidate tone components with the same sub-band sequence number in the current frequency region to obtain information of the target tone component in the current frequency region.
34. The device according to claim 21, characterized in that The current frequency region includes at least one subband, and the encoding module is used to obtain the subband sequence number corresponding to the candidate tone component in the current frequency region of the current frame according to the position information of the candidate tone component in the current frequency region of the current frame; obtain the subband sequence number corresponding to the candidate tone component in the current frequency region of the previous frame of the current frame; if the position information of the nth candidate tone component in the current frequency region of the current frame and the position information of the nth candidate tone component in the current frequency region of the previous frame meet the preset conditions, and the subband sequence number corresponding to the nth candidate tone component in the current frequency region of the current frame and the subband sequence number corresponding to the nth candidate tone component in the current frequency region of the previous frame are different, then the position information of the nth candidate tone component in the current frequency region of the current frame is corrected to obtain the information of the target tone component in the current frequency region, and the nth candidate tone component is any candidate tone component in the current frequency region.
35. The device according to claim 34, characterized in that The encoding module is used to arrange the candidate tone components in the current frequency region of the current frame in ascending or descending positions according to the position information of the candidate tone components in the current frequency region of the current frame to obtain the arranged candidate tone components in the current frequency region of the current frame; and obtain the subband sequence number corresponding to the candidate tone components in the current frequency region of the current frame according to the arranged candidate tone components in the current frequency region.
36. The device according to claim 35, characterized in that The preset condition includes: a difference between the position information of the nth candidate tone component in the current frequency region of the current frame and the position information of the nth candidate tone component in the current frequency region of the previous frame is less than or equal to a preset threshold.
37. The device according to claim 35 or 36, characterized in that The encoding module is used to correct the position information of the nth candidate tone component in the current frequency region of the current frame to the position information of the nth candidate tone component in the current frequency region of the previous frame.
38. The device according to claim 21, characterized in that The encoding module is used to obtain the information of the target tone component in the current frequency region according to the information of the candidate tone components in the current frequency region and the information of the maximum number of tone components that can be encoded in the current frequency region.
39. The device according to claim 38, characterized in that The encoding module is used to select X candidate tone components with the largest energy information or amplitude information of the candidate tone components in the current frequency region according to the information of the maximum number of tone components that can be encoded in the current frequency region, where X is less than or equal to the maximum number of tone components that can be encoded in the current frequency region, and X is a positive integer; determine that the information of the X candidate tone components is the information of the target tone components of the current frequency region, where X represents the number of target tone components in the current frequency region.
40. The device according to any one of claims 21, 23, 24, 27, 29, 31, 35, 36 and 39, characterized in that The information of the candidate tone component includes: amplitude information or energy information of the candidate tone component, and the amplitude information or energy information of the candidate tone component includes: power spectrum ratio of the candidate tone component, wherein the power spectrum ratio of the candidate tone component is the ratio of the power spectrum value of the candidate tone component to the average value of the power spectrum of the current frequency region.
41. An audio encoding device, characterized in that include: A non-volatile memory and a processor coupled to each other, wherein the processor calls a program code stored in the memory to execute the method according to any one of claims 1 to 20.
42. An audio encoding device, characterized in that The method comprises: an encoder configured to execute the method according to any one of claims 1 to 20.
43. A computer-readable storage medium, characterized in that The invention comprises a computer program which, when executed on a computer, causes the computer to perform the method according to any one of claims 1 to 20.
Citation Information
Patent Citations
Method and apparatus for encoding and decoding high frequency band
CN102750954A
Method and apparatus for sinusoidal encoding and decoding
CN107924683A
Encoding device, decoding device, and method thereof
US20100280833A1
