WO2012139401A1 - 一种音频编码方法及装置 - Google Patents

一种音频编码方法及装置 Download PDF

Info

Publication number
WO2012139401A1
WO2012139401A1 PCT/CN2011/084816 CN2011084816W WO2012139401A1 WO 2012139401 A1 WO2012139401 A1 WO 2012139401A1 CN 2011084816 W CN2011084816 W CN 2011084816W WO 2012139401 A1 WO2012139401 A1 WO 2012139401A1
Authority
WO
WIPO (PCT)
Prior art keywords
rate
band
low
signal
band signal
Prior art date
Application number
PCT/CN2011/084816
Other languages
English (en)
French (fr)
Inventor
苗磊
刘泽新
齐峰岩
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Priority to JP2013552820A priority Critical patent/JP2014509408A/ja
Priority to KR1020137018875A priority patent/KR20130116899A/ko
Priority to EP11863610.9A priority patent/EP2647974A4/en
Publication of WO2012139401A1 publication Critical patent/WO2012139401A1/zh
Priority to US14/010,103 priority patent/US20130346088A1/en

Links

Classifications

    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10LSPEECH ANALYSIS TECHNIQUES OR SPEECH SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING TECHNIQUES; SPEECH OR AUDIO CODING OR DECODING
    • G10L19/00Speech or audio signals analysis-synthesis techniques for redundancy reduction, e.g. in vocoders; Coding or decoding of speech or audio signals, using source filter models or psychoacoustic analysis
    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10LSPEECH ANALYSIS TECHNIQUES OR SPEECH SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING TECHNIQUES; SPEECH OR AUDIO CODING OR DECODING
    • G10L19/00Speech or audio signals analysis-synthesis techniques for redundancy reduction, e.g. in vocoders; Coding or decoding of speech or audio signals, using source filter models or psychoacoustic analysis
    • G10L19/02Speech or audio signals analysis-synthesis techniques for redundancy reduction, e.g. in vocoders; Coding or decoding of speech or audio signals, using source filter models or psychoacoustic analysis using spectral analysis, e.g. transform vocoders or subband vocoders
    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10LSPEECH ANALYSIS TECHNIQUES OR SPEECH SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING TECHNIQUES; SPEECH OR AUDIO CODING OR DECODING
    • G10L19/00Speech or audio signals analysis-synthesis techniques for redundancy reduction, e.g. in vocoders; Coding or decoding of speech or audio signals, using source filter models or psychoacoustic analysis
    • G10L19/002Dynamic bit allocation
    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10LSPEECH ANALYSIS TECHNIQUES OR SPEECH SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING TECHNIQUES; SPEECH OR AUDIO CODING OR DECODING
    • G10L19/00Speech or audio signals analysis-synthesis techniques for redundancy reduction, e.g. in vocoders; Coding or decoding of speech or audio signals, using source filter models or psychoacoustic analysis
    • G10L19/02Speech or audio signals analysis-synthesis techniques for redundancy reduction, e.g. in vocoders; Coding or decoding of speech or audio signals, using source filter models or psychoacoustic analysis using spectral analysis, e.g. transform vocoders or subband vocoders
    • G10L19/0204Speech or audio signals analysis-synthesis techniques for redundancy reduction, e.g. in vocoders; Coding or decoding of speech or audio signals, using source filter models or psychoacoustic analysis using spectral analysis, e.g. transform vocoders or subband vocoders using subband decomposition
    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10LSPEECH ANALYSIS TECHNIQUES OR SPEECH SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING TECHNIQUES; SPEECH OR AUDIO CODING OR DECODING
    • G10L19/00Speech or audio signals analysis-synthesis techniques for redundancy reduction, e.g. in vocoders; Coding or decoding of speech or audio signals, using source filter models or psychoacoustic analysis
    • G10L19/04Speech or audio signals analysis-synthesis techniques for redundancy reduction, e.g. in vocoders; Coding or decoding of speech or audio signals, using source filter models or psychoacoustic analysis using predictive techniques
    • G10L19/16Vocoder architecture
    • G10L19/18Vocoders using multiple modes

Definitions

  • the present application relates to the field of audio processing technologies, and in particular, to an audio encoding method and apparatus. Background technique
  • Audio coding is a technique for encoding audio signals involving narrowband, wideband, ultra-wideband or even full-band, and the wider the coding bandwidth, the higher the user experience.
  • the frequency band of the entire audio signal can be encoded by transform coding, for example, using MDCT (Modified Discrete Cosine Transform) coding method, and the entire input rate is obtained according to the total input rate.
  • MDCT Modified Discrete Cosine Transform
  • the audio signal can be further divided into a low band signal and a high band signal according to its characteristics
  • the low band signal and the high band signal can also be separately encoded, and the low band encoder and the high code are used for encoding.
  • the band encoders perform corresponding encoding operations on the low band signal and the high band signal at a given rate supported by their respective encoders.
  • G.722B G.722-SWB, G.722 super wideband extension
  • the total input rate is 80 kbit/s, which is fixed.
  • the low band rate allocated for the low band signal is 64 kbit/s
  • the high band rate allocated for the high band signal is 16 kbit/s.
  • the speech coding method in the prior art can only encode the low band signal and the high band signal according to the rate given in the standard or the rate set before the coding, because the coding performance is encoded.
  • the rate is limited, so for different types of audio signals, such as voice signals and music signals, if encoded at a fixed coding rate, the overall performance of the audio coding may be degraded.
  • the embodiment of the present application provides an audio encoding method and apparatus to solve the problem that the prior art can only encode a high-band signal and a low-band signal by using a preset given rate, resulting in low overall performance of audio coding.
  • An audio coding method including: Dividing the input audio signal into a low band signal and a high band signal;
  • An audio encoding device includes:
  • a band dividing unit configured to divide the input audio signal into a low band signal and a high band signal
  • An identification unit configured to separately identify types of the low band signal and the high band signal, and different types of low band signals and high band signals respectively correspond to different coding modes
  • An adaptive adjustment unit configured to adaptively allocate an input total rate of the audio signal to the low band signal and the high band signal according to different coding modes corresponding to the low band signal and the high band signal, where
  • the low band signal is a low band rate, and the high band signal is allocated to the high band rate;
  • the coding unit is configured to use the coding mode corresponding to the low band signal to the low band according to the low band rate
  • the signal is encoded and the high band signal is encoded at the high band rate by an encoding mode corresponding to the high band signal.
  • the input audio signal is divided into a low band signal and a high band signal, and the total input rate of the audio signal is determined according to different coding modes corresponding to the low band signal and the high band signal.
  • the low band signal and the high band signal are adaptively allocated, the low band signal is encoded according to the low band rate corresponding to the coding mode corresponding to the low band signal, and the high band signal is encoded according to the high band rate by the coding mode corresponding to the high band signal.
  • the encoding is not performed according to the rate set in the standard or before the encoding, but the encoding rate is adaptively adjusted according to the signal type, thereby improving The overall performance of audio coding.
  • FIG. 1 is a flow chart of a first embodiment of a speech encoding method of the present application
  • FIG. 2 is a schematic structural diagram of an encoder for encoding an embodiment of the method of the present application
  • FIG. 3 is a flowchart of a second embodiment of a speech encoding method of the present application
  • FIG. 4 is a flow chart of a third embodiment of a speech encoding method of the present application.
  • FIG. 5 is a flowchart of a fourth embodiment of a speech encoding method of the present application.
  • FIG. 6 is a flow chart of a fifth embodiment of a speech encoding method of the present application.
  • FIG. 7 is a block diagram of an embodiment of a speech encoding apparatus of the present application.
  • the following embodiments of the present invention provide a voice coding method and apparatus.
  • the embodiment of the present application automatically adjusts the low band rate and the high band rate of the low band signal and the high band signal according to the total input rate of the input voice signal and the type of the low band signal and the high band signal in the input voice signal, and according to The allocated rate adaptively encodes the low-band signal and the high-band signal, respectively, thereby improving the overall performance of the speech coding.
  • audio codecs and video codecs are widely used in various electronic devices, such as: mobile phones, wireless devices, personal data assistants (PDAs), handheld or portable computers, GPS receivers/navigators. , cameras, audio/video players, camcorders, video recorders, surveillance equipment, etc.
  • PDAs personal data assistants
  • audio/video players camcorders
  • video recorders surveillance equipment, etc.
  • an electronic device includes an audio encoder or an audio decoder, and the audio encoder or decoder may be directly implemented by a digital circuit or a chip such as a DSP (digital signal processor), or may be executed by a software code driven processor in the software code. The process is implemented.
  • DSP digital signal processor
  • FIG. 1 a flowchart of a first embodiment of a voice coding method according to the present application is as follows:
  • Step 101 Divide the input audio signal into a low band signal and a high band signal.
  • Cannot hold 102 Identify the types of low-band signals and high-band signals respectively. Different types of low-band signals and high-band signals correspond to different coding modes.
  • the low-band signal and the high-band signal are classified according to different signal characteristics.
  • the low-band signal may include a voice signal and an audio audio signal, and the voice signal may be further divided into an unvoiced segment signal, a stabilized voiced segment signal, and a general voice.
  • the band signal may include a noise type signal, a time domain abrupt signal, a harmonic signal, a general signal having a certain harmonicity, and the like.
  • the different types of signals that are divided correspond to different coding modes, for example:
  • the coding modes corresponding to the voice signal and the music audio signal respectively are a voice coding mode and an audio audio coding mode, wherein the voice coding mode includes but is not limited to the following modes: a UC (Unvoiced Coding mode) mode for encoding an unvoiced segment signal, VC (Voice Coding Mode) mode for encoding stable voiced segments, GC (Generic Coding mode) mode for encoding general voice frames and audio frames, and TC (transition Coding) for encoding transition frames Mode transition coding mode.
  • UC Unvoiced Coding mode
  • VC Voice Coding Mode
  • GC Generic Coding mode
  • TC Transition Coding
  • the different coding modes corresponding to the high-band signals include, but are not limited to, the following modes: Noise (noise coding) mode for encoding noise-like signals, Transient (transient coding) mode for encoding time-domain abrupt signals, for harmonics Harmonic mode with strong signal encoding, Normal mode for encoding the rest of the signal with certain harmonics. Normal mode can also be further classified according to needs and specific codec methods.
  • the coding modes of the high-band signal and the low-band signal are classified according to different types of audio signals.
  • the classification mode may not be limited to the above classification mode, that is, the signal type may be further fined. Divided into more coding modes.
  • Step 103 adaptively assign the total input rate of the audio signal to the low band signal and the high band signal according to different coding modes corresponding to the low band signal and the high band signal, wherein the low band rate is allocated to the low band signal, and the allocation is performed.
  • the high band rate is given to the high band signal.
  • the total input rate of the audio signal may be adjusted stepwise according to a preset low band rate or a high band rate, and then allocated to the low band signal and the high band signal.
  • the coding rate of the low-band signal is preferentially guaranteed; when the coding mode corresponding to the type of the low-band signal is UC mode, the lowest rate in the preset low-band rate set is allocated as the low-band rate. Giving the low band signal; when the input total rate is greater than or equal to the preset first rate, first assigning the lowest rate in the high band rate set as the initial high band rate to the high band signal; when the high band signal corresponds When the coding mode conforms to the type of rate adjustment, the high band rate is adjusted stepwise, and the adjustment rate corresponding to the high band coding mode corresponding to the initial high band rate is allocated as the high band rate to the high band signal.
  • other adjustments may be made according to different coding modes corresponding to the high band signal and the low band signal, and the coding rate of the low band signal is preferentially guaranteed; when the total input rate is large, The high band rate is adjusted starting from the lowest rate in the high band rate set; when the coding mode corresponding to the low band signal is the lowest occupying rate coding mode, the lowest rate in the low band rate set is allocated for the low band signal.
  • the difference between the embodiment of the present application and the prior art is that the low band signal and the high band signal are not respectively encoded according to a preset given rate, but the rate is self according to the type of the low band signal and the high band signal. Adapting to the adjustment, the specific adjustment process is described in detail in the subsequent embodiments.
  • Step 104 Encode the low band signal according to the allocated low band rate by the coding mode corresponding to the low band signal, and encode the high band signal according to the allocated high band rate by the coding mode corresponding to the high band signal.
  • FIG. 2 a schematic diagram of an encoder structure for encoding an embodiment of a speech coding method of the present application is as follows:
  • the encoder includes: a band division filter module, an adaptive bit allocation module, a high band coding module, a low band core coding module, and a multiplexing module.
  • the high-band coding module further includes a high-band coding classification module and N H high-band signal coding modules
  • the low-band core coding module further includes a low-band core coding classification module and NL low-band signal coding modules.
  • the N H high-band signal coding modules correspond to N H high-band signal types
  • the NL low-band signal coding modules correspond to NL low-band signal types.
  • the input audio signal is processed into a high-band signal and a low-band signal by being processed by the band-splitting module, wherein the high-band signal input high-band coding module is recognized by the high-band encoder classification module in the high-band coding module.
  • the type of signal is used to assign a high-band signal coding module according to the type of the high-band signal; the low-band signal input low-band core coding module, and the low-band encoder classification module in the low-band core coding module recognizes the low-band signal Type to assign a low-band signal encoding module according to the type of the low-band signal; and the adaptive bit-allocating module adaptively assigns the total input rate to the low-band signal according to the identified type of the low-band signal and the high-band signal High band signal.
  • the process of adaptively allocating the low band rate and the high band rate will be described in detail below in conjunction with specific application embodiments. In order to facilitate the description of the application embodiment, it is first assumed that the total input rate in the preset total set of audio code input rates includes: B There are a total of M input total rates;
  • Presetting the low band rate in the low band rate set includes: B U , BL 2 ... BLP, a total of P low band rates, where B u ⁇ B L2 ... ⁇ B LP ; preset high band rate set
  • the high band rate includes: B H1 , B H2 ... BHQ, there are a total of Q high band rates, where B H1 ⁇ B H2 ... ⁇ B HQ , B H1 can be 0, that is, to ensure the overall quality, only The low band signal is encoded without encoding the high band signal.
  • Step 301 Divide the input audio signal into a low band signal and a high band signal.
  • Step 302 Identify the types of the low band signal and the high band signal respectively, and the different types of low band signals and high band signals respectively correspond to different coding modes.
  • the speech coding mode includes: a UC mode for encoding an unvoiced segment signal, a VC mode for encoding a stable voiced segment, a GC mode for encoding a general speech frame and an audio frame, and a TC mode for encoding a transition frame.
  • the coding modes corresponding to different types of high-band signals include: Noise mode for encoding noise-like signals, Transient coding mode for encoding time-domain abrupt signals, and Harmonic mode for encoding signals with stronger harmonics.
  • the remaining signals of certain harmonics are encoded in the Normal mode. Normal mode can also be further classified according to needs and specific codec methods.
  • Step 303 Determine whether the coding mode corresponding to the type of the low band signal is UC, and if yes, execute step 304; otherwise, execute step 305.
  • Step 304 Allocating the lowest rate in the preset low-band rate set as the low-band rate to the low-band signal, and dividing the remaining rate obtained by subtracting the low-band rate from the input total rate as the high-band rate to the high-band signal, and performing Step 311.
  • Step 305 Determine whether the total input rate is less than a preset first rate. If yes, go to step 306; otherwise, go to step 307.
  • the preset first rate may be all the total rates in the input total rate set from low to high.
  • the total input rate at the first third position for example, the total input rate in the input total rate set in order of lowest to highest is B 2 , B 3 , B 4 , B 5 , B 6 , Then the preset first rate can be set to B 2 .
  • Step 306 Allocating the lowest rate in the preset high-band rate set as the high-band rate to the high-band signal, and dividing the remaining rate obtained by subtracting the high-band rate from the input total rate as the low-band rate to the low-band signal, and performing Step 311.
  • the high band rate of the high band signal is set to BHI, and the low band rate of the corresponding low band signal is -
  • Step 307 Assign the lowest rate in the high band rate set to the high band signal as the initial high band rate.
  • the high-band rate of the high-band signal can be set to ⁇ ⁇ 1 , which is the lowest of the high-band rate set. The rate, which ensures that the low band is allocated more, thus better guaranteeing low band quality.
  • the initial high band rate may be set to a rate adjacent to the result of B ⁇ alpha1 in the high band rate set, where alpha1 may be a preset value. For example, it may be 1/3; or, the low band rate may be set to a rate close to the result of B ⁇ alphaS in the low band rate set, where alpha2 may be a preset value, for example, may be 2/3, corresponding initial The high-band rate is Br B ⁇ alphaS a.
  • the above-mentioned manner for setting the initial high-band rate may be various, and the embodiment of the present application does not limit the embodiment.
  • Step 308 Determine whether the coding mode corresponding to the type of the high band signal is Harmonic mode, and if yes, execute step 309; otherwise, execute step 310.
  • Step 309 Adjust the high band rate to a high rate of the initial high band rate when the high band rate is arranged in the low to high order, and subtract the remaining rate from the input total rate as the remaining rate.
  • the low band rate is assigned to the low band signal, and step 311 is performed.
  • the high band signal is high.
  • the band rate is adjusted upward from the currently set B H1 sequence to B H2 , and the corresponding low band signal has a low band rate of Br B H2 .
  • the high band rate may be adjusted from the current set rate to a higher level of the current set rate in the high band rate set. rate. It can be seen that the purpose of the embodiment of the present application is to show the manner in which the rate is adjusted in stages, and is not used to limit the specific value of the initial setting of the rate.
  • Step 310 The initial high band rate is taken as the high band rate, and the remaining rate obtained by subtracting the initial high band rate from the input total rate is allocated as a low band rate to the low band signal.
  • the high band rate of the high band signal is not adjusted, and is still B H1 , and the low band rate of the corresponding low band signal is ⁇
  • Step 311 Encode the low-band signal according to the allocated low-band rate by the coding mode corresponding to the low-band signal, and encode the high-band signal according to the allocated high-band rate by the coding mode corresponding to the high-band signal.
  • FIG. 4 is a flowchart of a third embodiment of a speech encoding method of the present application, the embodiment shows an encoding process including a speech signal and a music signal in a low band signal:
  • Step 401 Divide the input audio signal into a low band signal and a high band signal.
  • Step 402 Identify the types of the low band signal and the high band signal respectively, and different types of low band signals and high band signals respectively correspond to different coding modes.
  • the low band signal may use a speech coding mode, for example, CELP coding.
  • the speech coding modes include: a UC mode for encoding an unvoiced segment signal, a VC mode for encoding a stable voiced segment, a GC mode for encoding a general speech frame and an audio frame, and a TC mode for encoding a transition frame.
  • the audio signal mode can also be used for the low band signal.
  • the coding modes corresponding to different types of high-band signals include: Noise mode for encoding noise-like signals, Transient coding mode for encoding time-domain abrupt signals, and Harmonic mode for encoding signals with stronger harmonics.
  • a certain harmonic signal is encoded in the Normal mode. Normal mode can also be further classified according to needs and specific codec methods. Step 403: Determine whether the coding mode corresponding to the type of the low band signal is UC, and if yes, execute step 404; otherwise, execute step 405.
  • Step 404 Allocating a lowest rate in the preset low-band rate set as a low-band rate to the low-band signal, and dividing the remaining rate obtained by subtracting the low-band rate from the input total rate as a high-band rate to the high-band signal, and performing Step 413.
  • Step 405 Determine whether the total input rate is less than a preset first rate. If yes, go to step 406; otherwise, go to step 407.
  • the preset first rate may be all the total rates in the input total rate set from low to high.
  • the total input rate at the first third position for example, the total input rate in the input total rate set in order of lowest to highest is B 2 , B 3 , B 4 , B 5 , B 6 , Then the preset first rate can be set to B 2 .
  • Step 406 Allocating the lowest rate in the preset high-band rate set as the high-band rate to the high-band signal, and dividing the remaining rate obtained by subtracting the high-band rate from the input total rate as the low-band rate to the low-band signal, and performing Step 413.
  • the high band rate of the high band signal is set to
  • the low band rate of the corresponding low band signal is -
  • Step 407 Allocate the lowest rate in the high band rate set as the initial high band rate to the high band signal.
  • the high-band rate of the high-band signal can be set to ⁇ ⁇ 1 , which is the lowest of the high-band rate set. The rate, which ensures that the low band is allocated more, thus better guaranteeing low band quality.
  • the initial high band rate may be set to a rate adjacent to the result of B ⁇ alpha1 in the high band rate set, where alpha1 may be a preset value. For example, it may be 1/3; or, the low band rate may be set to a rate close to the result of B ⁇ alphaS in the low band rate set, where alpha2 may be a preset value, for example, may be 2/3, corresponding initial High band rate is Br
  • alpha1 may be a preset value.
  • alpha2 may be a preset value
  • alpha2 may be a preset value
  • corresponding initial High band rate is Br
  • the above-mentioned manners for setting the initial high-band rate may be various, and the embodiment of the present application does not limit the embodiment.
  • Step 408 determining whether the encoding mode corresponding to the type of the high-band signal is Harmonic mode, and the harmonic mode of the low-band signal is less than the threshold value and the encoding mode corresponding to the type of the low-band signal is the audio encoding mode, and if yes, executing step 409; Otherwise, step 410 is performed.
  • the harmonicity of the low band signal is smaller than the threshold value in order to judge whether the harmonicity of the low band signal is not strong.
  • the harmonics of the low-band signal can be obtained by spectrum analysis.
  • the specific value can be obtained by the peak-to-average ratio parameter.
  • the peak-to-average ratio parameter can be the ratio of the maximum value and the average value of the current sub-band spectrum. The stronger the sex, the judgment process of the above harmonic intensity is consistent with the prior art, and will not be described herein.
  • Step 409 Adjust the high-band rate to a high-level rate of the initial high-band rate when the high-band rate set is arranged in the low-to-high order, and the remaining rate obtained by subtracting the high-level rate from the input total rate as the low-band rate. Assign to the low band signal and go to step 413.
  • the high band rate of the high band signal is from the current
  • the set B H1 sequence is adjusted upward to B H3 , and the corresponding low band signal has a low band rate of B r B H3 .
  • the high band rate may be adjusted from the current set rate to a higher level of the current set rate in the high band rate set. rate. It can be seen that the purpose of the embodiment of the present application is to show the manner in which the rate is adjusted in stages, and is not used to limit the specific value of the initial setting of the rate.
  • Step 410 Determine whether the coding mode corresponding to the type of the high band signal is Normal mode, and the harmonic mode of the low band signal is less than the threshold value and the coding mode corresponding to the type of the low band signal is the audio coding mode, and if yes, step 411 is performed; Otherwise, step 412 is performed.
  • Step 411 Adjust the high-band rate to a high-order rate of the initial high-band rate when the high-band rate set is arranged in the low-to-high order, and the remaining rate obtained by subtracting the high-order rate from the input total rate as a low
  • the band rate is assigned to the low band signal, and step 413 is performed.
  • the high band rate of the high band signal is The currently set B H1 sequence is adjusted upward to B H2 , and the corresponding low band signal has a low band rate of ⁇ ⁇ B H2 .
  • Step 412 Taking the initial high band rate as the high band rate and subtracting the initial total rate from the initial high band The remaining rate obtained after the rate is assigned to the low band signal as a low band rate.
  • Step 413 Encode the low-band signal according to the allocated low-band rate by the coding mode corresponding to the low-band signal, and encode the high-band signal according to the allocated high-band rate by the coding mode corresponding to the high-band signal.
  • the process of encoding the high band signal and the low band signal in the present application is consistent with the prior art and will not be described herein. Subsequently, the high-band signal is encoded and the code stream encoded by the low-band signal is multiplexed, and then the synthesized bit stream is output, thereby completing the encoding process.
  • FIG. 5 it is a flowchart of a fourth embodiment of a speech coding method according to the present application.
  • This embodiment shows another coding process in which only a speech signal is included in a low-band signal:
  • Step 501 Divide the input audio signal into a low band signal and a high band signal.
  • Step 502 Identify the types of the low band signal and the high band signal respectively, and different types of low band signals and high band signals respectively correspond to different coding modes.
  • the speech coding modes include: a UC mode for encoding an unvoiced segment signal, a VC mode for encoding a stable voiced segment, a GC mode for encoding a general speech frame and an audio frame, and a TC mode for encoding a transition frame.
  • the coding modes corresponding to different types of high-band signals include: encoding noise-like signals
  • Noise mode Transient coding mode for encoding time-domain abrupt signals
  • Harmonic mode for encoding signals with strong harmonics
  • Normal mode for encoding the remaining signals with certain harmonics. Normal mode can also be further classified according to needs and specific codec methods.
  • Step 503 Determine whether the coding mode corresponding to the type of the low band signal is UC, and if yes, execute step 504; otherwise, execute step 505.
  • Step 504 Allocating the lowest rate in the preset low-band rate set as the low-band rate to the low-band signal, and dividing the remaining rate obtained by subtracting the low-band rate from the input total rate as the high-band rate to the high-band signal, and executing Step 513.
  • Step 505 Determine whether the total input rate is less than a preset first rate. If yes, go to step 506; otherwise, go to step 507.
  • the preset first rate may be the total input rate at the first third position after all the total rates in the input total rate set are arranged from low to high, for example, the input total rate set is from low to
  • the total input rate of the high order is BB 2 , B 3 , B 4 , B 5 , B 6 , and the preset first rate can be set to B 2 .
  • Step 506 Allocating a lowest rate in the preset high-band rate set as a high-band rate to the high-band signal, and dividing the remaining rate obtained by subtracting the high-band rate from the input total rate as a low-band rate to the low-band signal, and performing Step 513.
  • the high band rate of the high band signal is set to B H1
  • the low band rate of the corresponding low band signal is Br
  • Step 507 Assign the lowest rate in the high band rate set to the high band signal as the initial high band rate.
  • the high band rate of the high band signal may be set to B H1 , and B H1 is the lowest of the high band rate set. The rate, which ensures that the low band is allocated more, thus better guaranteeing low band quality.
  • the initial high band rate may also be set to a rate adjacent to the result of B ⁇ alpha1 in the high band rate set, where alpha1 may be a preset value. For example, it may be 1/3; or, the low band rate may be set to a rate close to the result of B ⁇ alphaS in the low band rate set, where alpha2 may be a preset value, for example, may be 2/3, corresponding initial The high-band rate is Br B ⁇ alphaS a.
  • the above-mentioned manner for setting the initial high-band rate may be various, and the embodiment of the present application does not limit the embodiment.
  • Step 508 Determine whether the coding mode corresponding to the type of the low band signal is not the VC mode, and the coding mode corresponding to the type of the high band signal is the Harmonic mode. If yes, go to step 509; otherwise, go to step 510.
  • Step 509 Adjust the high-band rate to a high-order rate of the initial high-band rate when the high-band rate set is arranged in the low-to-high order, and the remaining rate obtained by subtracting the high-order rate from the input total rate as a low
  • the band rate is assigned to the low band signal, and step 513 is performed.
  • the high band rate of the high band signal is adjusted upward from the currently set B H1 sequence to the B H2 , the low band rate of the corresponding low band signal is Bi-BH
  • the speed is being performed.
  • the high band rate can be adjusted from the current set rate to a higher rate of the current set rate in the high band rate set. It can be seen that the purpose of the embodiment of the present application is to show the manner that the rate is adjusted in stages, and is not used to limit the specific value of the initial setting of the rate.
  • Step 510 Determine whether the coding mode corresponding to the type of the low band signal is the VC mode, and the coding mode corresponding to the type of the high band signal is the Noise mode. If yes, return to step 511; otherwise, execute step 512.
  • Step 511 Adjust the high-band rate to a high-order rate of the initial high-band rate when the high-band rate set is arranged in the low-to-high order, and the remaining rate obtained by subtracting the high-order rate from the input total rate as a low
  • the band rate is assigned to the low band signal, and step 513 is performed.
  • the high band rate of the high band signal is adjusted upward from the currently set B H1 sequence to B H2 .
  • the low band rate of the corresponding low band signal is ⁇
  • the highest rate may be adjusted from the current set rate to the high set rate in the high band rate set.
  • Primary rate It can be seen that the purpose of the embodiment of the present application is to show the rate adjustment in a step manner, and is not used to limit the specific value of the initial rate setting.
  • Step 512 The remaining rate obtained by subtracting the initial high band rate from the input total rate is assigned as a low band rate to the low band signal.
  • the coding mode corresponding to the type of the low band signal is the VC mode, and the coding mode corresponding to the type of the high band signal is not the Harmonic mode or the Noise mode, the high band rate of the high band signal is not adjusted, and is still B. H1 , the corresponding low band signal has a low band rate of Br
  • Step 513 encode the low-band signal according to the allocated low-band rate by the coding mode corresponding to the low-band signal, and encode the high-band signal according to the allocated high-band rate by the coding mode corresponding to the high-band signal.
  • Step 601 Divide the input audio signal into a low band signal and a high band signal.
  • Step 602 Identify the types of the low band signal and the high band signal respectively, and different types of low band signals and high band signals respectively correspond to different coding modes.
  • the speech coding modes include: a UC mode for encoding an unvoiced segment signal, a VC mode for encoding a stable voiced segment, a GC mode for encoding a general speech frame and an audio frame, and a TC mode for encoding a transition frame.
  • the coding modes corresponding to different types of high-band signals include: Noise mode for encoding noise-like signals, Transient coding mode for encoding time-domain abrupt signals, and Harmonic mode for encoding signals with stronger harmonics.
  • the remaining signals of certain harmonics are encoded in the Normal mode. Normal mode can also be further classified according to needs and specific codec methods.
  • Step 603 Determine whether the coding mode corresponding to the type of the low band signal is UC, and if yes, execute step 604; otherwise, execute step 605.
  • Step 604 Allocating the lowest rate in the preset low-band rate set as the low-band rate to the low-band signal, and dividing the remaining rate obtained by subtracting the low-band rate from the input total rate as the high-band rate to the high-band signal, and executing Step 614.
  • Step 605 Determine whether the total input rate is less than a preset first rate. If yes, go to step 606; otherwise, go to step 607.
  • the preset first rate may be all the total rates in the input total rate set from low to high.
  • the total input rate at the first third position for example, the total input rate in the input total rate set in order of lowest to highest is B 2 , B 3 , B 4 , B 5 , B 6 , Then the preset first rate can be set to B 2 .
  • Step 606 Allocating the lowest rate in the preset high-band rate set as the high-band rate to the high-band signal, and dividing the remaining rate obtained by subtracting the high-band rate from the input total rate as the low-band rate to the low-band signal, and performing Step 614.
  • the high band rate of the high band signal is set to B H1
  • the low band rate of the corresponding low band signal is - ⁇ ⁇ Step 607: Allocate the lowest rate in the high band rate set as the current high band rate to the high band signal, and the corresponding current low band rate is the input total rate minus the current high band rate.
  • the current high-band rate of the high-band signal may be set to B H1 , and B H1 is the lowest of the high-band rate set.
  • the rate, the current low band rate of the corresponding low band signal is - B H1 .
  • the current high band rate may be set to a rate adjacent to the result of B ⁇ alpha1 in the high band rate set, where alpha1 may be a preset value. For example, it may be 1/3; or, the current low band rate may be set to a rate close to the result of B ⁇ alphaS in the low band rate set, where alpha2 may be a preset value, for example, may be 2/3.
  • Corresponding current high band rate is B r
  • the foregoing method for setting the current high-band rate may be various, and the embodiment of the present application does not limit the embodiment.
  • Step 608 Encode the low-band signal according to the initial low-band rate by the coding mode corresponding to the low-band signal, obtain a local low-band composite signal, and calculate a signal-to-noise ratio SNR value of the local low-band composite signal.
  • Step 609 Determine whether the SNR value is within a preset range. If no, go to step 610; if yes, go to step 614.
  • Step 610 When the SNR value is less than the minimum value of the preset range, adjust the low band rate to a high first rate of the current low band rate when the low band rate is arranged in the low band order, when the SNR value is greater than the pre When the maximum value of the range is set, the low band rate is adjusted to the lower rate of the current low band rate when arranged in the low to high order in the low band rate set.
  • Step 611 Encode the low-band signal according to the adjusted low-band rate by the coding mode corresponding to the low-band signal, obtain a local low-band composite signal, and recalculate the SNR value of the local low-band composite signal.
  • Step 612 Determine whether the recalculated SNR value is within a preset range. If not, return to step 610; if yes, execute step 613.
  • Step 613 The adjusted low band rate is taken as the low band rate of the low band signal, and the corresponding input total rate is subtracted from the adjusted low band rate as the high band rate of the high band signal.
  • Step 614 Encode the low-band signal according to the allocated low-band rate by the coding mode corresponding to the low-band signal, and encode the high-band signal according to the allocated high-band rate by the coding mode corresponding to the high-band signal.
  • the process of encoding the high band signal and the low band signal in the present application is consistent with the prior art, and is no longer Narration. Subsequently, the high-band signal is encoded and the code stream encoded by the low-band signal is multiplexed, and then the synthesized bit stream is output, thereby completing the encoding process.
  • the present application after determining that the total input rate is not less than the preset first rate, it may further determine whether the total input rate is greater than a preset second rate, when greater than the first At the second rate, the high band rate of the high band signal can be set to be the highest rate in the preset high band rate set, the total input rate is subtracted from the set high band rate, and the obtained remaining rate is assigned as the low band rate to the low band signal. And, when the total input rate is within a range defined by the two preset rates, and then performing an adaptive adjustment process after the original input total rate is less than the preset first rate.
  • the present application also provides an embodiment of an audio encoding device.
  • FIG. 7 a block diagram of an embodiment of an audio encoding apparatus of the present application is shown.
  • the audio encoding device includes: a band dividing unit 710, an identifying unit 720, an adaptive adjusting unit 730, and an encoding unit 740.
  • the banding unit 710 is configured to divide the input audio signal into a low band signal and a high band signal.
  • the identifying unit 720 is configured to separately identify the type of the low band signal and the high band signal, and different types of low band signals. And the high band signals respectively correspond to different coding modes;
  • the adaptive adjustment unit 730 is configured to adaptively allocate an input total rate of the audio signal to the low band signal and the high band signal according to different coding modes corresponding to the low band signal and the high band signal, where The low band rate is the low band rate, and the high band signal is assigned to the high band rate; the encoding unit 740 is configured to use the coding mode corresponding to the low band signal according to the low band rate The low band signal is encoded, and the high band signal is encoded at the high band rate by an encoding mode corresponding to the high band signal.
  • the coding modes corresponding to the different types of low-band signals include a voice coding mode and a music audio coding mode, where the voice coding modes include: a transition coding TC mode, a normal coding GC mode, a voiced coding VC mode, and an unvoiced coding UC mode;
  • the coding modes corresponding to different types of high-band signals include: noise coded Noise mode, transient coded Transient mode, harmonically coded Harmonic mode, and normal coded Normal mode.
  • the Normal mode can be further classified according to needs and specific codec methods. It should be noted that the coding modes of the above high band signal and low band signal are described. They are classified according to different types of audio signals. In actual application, they may not be limited to the above classification mode, that is, the coding modes may be further subdivided according to the signal type.
  • the adaptive adjustment unit may include (not shown in FIG. 7): a first rate allocating unit, configured to allocate a lowest rate in the preset high band rate set as the high band rate to the high band signal, And the remaining rate obtained by subtracting the high band rate from the total input rate is allocated to the low band signal as a low band rate;
  • the first rate allocating unit is configured to: when the encoding mode corresponding to the type of the low band signal is not the UC mode, assign the lowest rate in the preset high band rate set to the high band rate as the high band rate With a signal, when the coding mode corresponding to the type of the low band signal is the UC mode, the lowest rate of the preset low band rate set is allocated to the low band signal as the low band rate, and the total input rate is The remaining rate obtained by subtracting the high band rate is assigned to the low band signal as a low band rate.
  • the first rate allocating unit may further include: an initial high band rate allocating unit, configured to: when the total input rate is greater than or equal to a preset first rate, use a lowest rate in the high band rate set as an initial height
  • the rate allocation is allocated to the high-band signal; and the rate allocation adjusting unit is configured to adjust the high-band signal coding mode to be higher than the initial high-band rate when the coding mode corresponding to the high-band signal conforms to the rate adjustment type
  • the rate is assigned to the high band signal as a high band rate, and the remaining rate obtained by subtracting the high band rate from the total input rate is assigned to the low band signal as a low band rate.
  • the adaptive adjustment unit may include (not shown in FIG. 7): a determining unit and a rate allocating unit, wherein the rate allocating unit is configured to: when the determining unit determines the encoding corresponding to the type of the low band signal When the mode is the UC mode, the lowest rate in the preset low band rate set is allocated to the low band signal as the low band rate, and the remaining rate obtained by subtracting the low band rate from the input total rate is taken as The high band rate is assigned to the high band signal.
  • the rate allocating unit is further configured to: when the determining unit determines that the coding mode corresponding to the type of the low band signal is not the UC mode, and the total input rate is less than the preset first rate, Setting a lowest rate in the set of high band rates as the high band rate to the high band signal, and assigning the remaining rate obtained by subtracting the high band rate from the total input rate to the low band rate as the low band rate With signal.
  • the adaptive adjustment unit may further include: (not shown in FIG. 7): a first rate adjustment unit, where the rate allocation unit is further configured to: when the determining unit determines that the total input rate is not less than the At the first rate, the lowest rate in the set of high band rates is taken as the initial high band rate And the determining unit is further configured to determine whether the encoding mode corresponding to the type of the high-band signal is a Harmonic mode, and the first rate adjusting unit is configured to determine, when the determining unit is Adjusting the high band rate to a high first rate of the initial high band rate when the high band rate set is arranged in a low to high order, and subtracting the input first rate from the high first rate The obtained remaining rate is allocated to the low band signal as a low band rate; the rate allocating unit is further configured to use the initial high band rate as a high band rate when the determining unit determines to be no, and The remaining rate obtained by subtracting the initial high band rate from the total input rate is assigned to the low band signal as a low band
  • the adaptive adjustment unit may further include: (not shown in FIG. 7): a second rate adjustment unit, wherein the rate allocation unit is further configured to: when the determining unit determines that the total input rate is not less than the At the first rate, the lowest rate of the high-band rate set is allocated to the high-band signal as an initial high-band rate; the determining unit is further configured to determine whether an encoding mode corresponding to the type of the high-band signal In the Harmonic mode, the harmonicity of the low-band signal is less than the threshold, and the coding mode corresponding to the type of the low-band signal is an audio coding mode.
  • the second rate adjustment unit is configured to determine, when the determining unit is Yes, the high band rate is adjusted to a high second rate of the initial high band rate when the high band rate set is arranged in a low to high order, and the input total rate is subtracted from the high second rate.
  • the obtained remaining rate is allocated to the low-band signal as a low-band rate; the determining unit is further configured to determine whether the high-band signal is high when the determining unit determines to be no
  • the coding mode corresponding to the type of the number is the Normal mode, and the harmonicity of the low-band signal is less than the threshold and the coding mode corresponding to the type of the low-band signal is the audio coding mode;
  • the second rate adjustment unit is further used When the determining unit determines YES, the high band rate is adjusted to be a high first rate of the initial high band rate when the high band rate set is arranged in a low to high order, and the total input is a rate obtained by subtracting the high rate from the first rate is allocated to the low band signal as a low band rate;
  • the rate allocating unit is further configured to: when the determining unit determines to be no, the initial height is The band rate is used as the high band rate, and the remaining rate obtained by subtracting the initial high band rate from the input total rate is assigned to the
  • the adaptive adjustment unit may further include: (not shown in FIG. 7): a third rate adjustment unit, wherein the rate allocation unit is further configured to: when the determining unit determines that the total input rate is not less than the At the first rate, the lowest rate of the high-band rate set is allocated to the high-band signal as an initial high-band rate; the determining unit is further configured to determine whether the type of the low-band signal corresponds to The code mode is not the VC mode, and the coding mode corresponding to the type of the high band signal is the Harmonic mode; the third rate adjustment unit is configured to adjust the high band rate to the high when the determining unit determines to be YES.
  • a third rate adjustment unit wherein the rate allocation unit is further configured to: when the determining unit determines that the total input rate is not less than the At the first rate, the lowest rate of the high-band rate set is allocated to the high-band signal as an initial high-band rate; the determining unit is further configured to determine whether the type of the low-band signal corresponds to The code
  • the determining unit is further configured to: when the determining unit determines to be no, determine whether the coding mode corresponding to the type of the low-band signal is the VC mode, and the coding mode corresponding to the type of the high-band signal is The third rate adjustment unit is further configured to: when the determining unit determines to be yes, adjust the high band rate to be the highest in the high band rate set according to the lowest to highest order, the initial height.
  • the remaining rate obtained by subtracting the higher rate from the input total rate is allocated as a low band rate to the low band signal; the rate allocating unit is also used to When the judging unit judges NO, the remaining rate obtained by subtracting the initial high band rate from the total input rate is allocated to the low band signal as a low band rate.
  • the adaptive adjustment unit may further include (not shown in FIG. 7): a fourth rate adjustment unit and an SNR calculation unit, where the rate allocation unit is further configured to: when the determining unit determines that the total input rate is not less than At the first rate, the lowest rate in the high band rate set is allocated to the high band signal as the current high band rate, and the corresponding current low band rate is the input total rate minus the current high band rate; a calculating unit, configured to encode the lowband signal according to the initial lowband rate by using an encoding mode corresponding to the lowband signal, obtain a local lowband composite signal, and calculate an SNR value of the local lowband composite signal The determining unit is further configured to determine whether the SNR value is within a preset range, and the rate allocating unit is further configured to: when the determining unit determines to be YES, use the initial high band rate as the a high band rate of the high band signal, the initial low band rate being used as a low band rate of the low band signal; the fourth rate adjusting unit, configured
  • the low band rate is adjusted to a lower first rate of the current low band rate when arranged in a low to high order in the low band rate set;
  • the SNR calculation unit is also used to encode the low band signal
  • the mode encodes the low-band signal according to the adjusted low-band rate to obtain a local low-band composite signal, and recalculates the SNR value of the local low-band composite signal;
  • the determining unit is further configured to determine whether the re-calculated SNR value is
  • the rate allocation unit is further configured to: when the determining unit determines to be YES, use the adjusted low band rate as a low band rate of the low band signal, and the corresponding input total The rate is subtracted from the adjusted low band rate as the high band rate of the high band signal;
  • the fourth rate adjusting unit is further configured to repeatedly perform the function of the fourth rate adjusting unit when the determining unit determines to be no h
  • the determining unit is further configured to: after determining that the total input rate is not less than the first rate, determine whether the total input rate is greater than a preset second rate; and, the rate allocating unit further And when the determining unit determines that the yes, the highest rate in the high band rate set is allocated to the high band signal as the high band rate, and the remaining rate obtained by subtracting the highest rate from the input total rate is taken as the low The band rate is assigned to the low band signal.
  • the input audio signal is divided into a low band signal and a high band signal, and the total input rate of the audio signal is according to different coding modes corresponding to the low band signal and the high band signal.
  • the total input rate of the audio signal is according to different coding modes corresponding to the low band signal and the high band signal.
  • the encoding is not performed according to the rate given in the standard, but the encoding rate is adaptively adjusted according to the signal type, thereby improving the overall encoding of the audio encoding. performance.
  • the techniques in the embodiments of the present invention can be implemented by means of software plus a necessary general hardware platform.
  • the technical solution in the embodiments of the present invention may be embodied in the form of a software product in essence or in the form of a software product, and the computer software product may be stored in a storage medium such as a ROM/RAM. , a diskette, an optical disk, etc., includes instructions for causing a computer device (which may be a personal computer, server, or network device, etc.) to perform the methods described in various embodiments of the present invention or in some portions of the embodiments.
  • a computer device which may be a personal computer, server, or network device, etc.

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Computational Linguistics (AREA)
  • Signal Processing (AREA)
  • Health & Medical Sciences (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Human Computer Interaction (AREA)
  • Acoustics & Sound (AREA)
  • Multimedia (AREA)
  • Spectroscopy & Molecular Physics (AREA)
  • Compression, Expansion, Code Conversion, And Decoders (AREA)
  • Signal Processing For Digital Recording And Reproducing (AREA)

Description

一种音频编码方法及装置 本申请要求于 2011 年 4 月 13 日提交中国专利局、 申请号为 201110092203.4、 发明名称为"一种音频编码方法及装置"的中国专利申请的优 先权, 其全部内容通过引用结合在本申请中。
技术领域
本申请涉及音频处理技术领域, 特别是涉及一种音频编码方法及装置。 背景技术
音频编码是对涉及窄带、 宽带、超宽带甚至全带的音频信号进行编码的技 术, 编码带宽越宽能够获得越高的用户体验。 在现有的语音编码技术中, 可以 采用变换编码对整个音频信号的频带进行编码, 例如, 采用 MDCT ( Modified Discrete Cosine Transform, 改进型离散余弦变换 )编码方式, 根据可得到的输 入总速率对整个频带进行统一的速率分配。
由于音频信号根据其特性可以进一步分为低带信号和高带信号,因此现有 的编解码技术中,也可以对低带信号和高带信号分别进行编码, 编码时采用低 带编码器和高带编码器按照其各自编码器支持的给定速率对低带信号和高带 信号进行相应的编码操作。 例如, 在由 ITU ( International Telecommunication Union 国际电信联盟 )制定的标准 G.722B ( G.722-SWB, G.722 super wideband extension ) 中的一种情况下, 输入总速率为 80kbit/s, 则固定为低带信号分配 的低带速率为 64kbit/s, 为高带信号分配的高带速率为 16kbit/s。
由此可见,现有技术中的语音编码方式,在对低带信号和高带信号进行编 码时, 只能按照标准中给定的速率或编码前设定的速率进行编码, 由于编码性 能受到编码速率的限制, 因此对于不同类型的音频信号, 例如, 语音信号和音 乐信号,如果采用固定的编码速率进行编码,则可能降低音频编码的总体性能。 发明内容
本申请实施例提供了一种音频编码方法及装置,以解决现有技术仅能采用 预置给定速率对高带信号和低带信号进行编码,导致音频编码总体性能不高的 问题。
本申请实施例公开了如下技术方案:
一种音频编码方法, 包括: 将输入的音频信号分为低带信号和高带信号;
分别识别所述低带信号和高带信号的类型,不同类型的低带信号和高带信 号分别对应不同的编码模式;
按照所述低带信号和高带信号对应的不同编码模式,将所述音频信号的输 入总速率自适应分配给所述低带信号和高带信号,其中, 分配给所述低带信号 的为低带速率, 分配给所述高带信号的为高带速率;
通过所述低带信号对应的编码模式按照所述低带速率对所述低带信号进 行编码,以及通过所述高带信号对应的编码模式按照所述高带速率对所述高带 信号进行编码。
一种音频编码装置, 包括:
分带单元, 用于将输入的音频信号分为低带信号和高带信号;
识别单元, 用于分别识别所述低带信号和高带信号的类型, 不同类型的低 带信号和高带信号分别对应不同的编码模式;
自适应调整单元, 用于按照所述低带信号和高带信号对应的不同编码模 式,将所述音频信号的输入总速率自适应分配给所述低带信号和高带信号, 其 中, 分配给所述低带信号的为低带速率, 分配给所述高带信号的为高带速率; 编码单元,用于通过所述低带信号对应的编码模式按照所述低带速率对所 述低带信号进行编码,以及通过所述高带信号对应的编码模式按照所述高带速 率对所述高带信号进行编码。
由上述实施例可以看出,本申请实施例中将输入的音频信号分为低带信号 和高带信号,按照低带信号和高带信号对应的不同编码模式,将音频信号的输 入总速率自适应分配给低带信号和高带信号,通过低带信号对应的编码模式按 照低带速率对低带信号进行编码,并通过高带信号对应的编码模式按照高带速 率对高带信号进行编码。由于本申请实施例中在对低带信号和高带信号进行编 码时, 并非按照标准中给定或编码前设定的速率进行编码, 而是根据信号类型 的不同自适应调整编码速率, 因此提高了音频编码的总体性能。
附图说明
为了更清楚地说明本申请实施例或现有技术中的技术方案,下面将对实施 例或现有技术描述中所需要使用的附图作筒单地介绍,显而易见地,对于本领 域普通技术人员而言,在不付出创造性劳动性的前提下,还可以根据这些附图 获得其他的附图。
图 1为本申请语音编码方法的第一实施例流程图;
图 2为应用本申请方法实施例进行编码的一种编码器结构示意图; 图 3为本申请语音编码方法的第二实施例流程图;
图 4为本申请语音编码方法的第三实施例流程图;
图 5为本申请语音编码方法的第四实施例流程图;
图 6为本申请语音编码方法的第五实施例流程图;
图 7为本申请语音编码装置的实施例框图。
具体实施方式
本发明如下实施例提供了一种语音编码方法及装置。本申请实施例根据输 入语音信号的输入总速率, 以及输入语音信号中低带信号和高带信号的类型, 自动调整为低带信号和高带信号分配的低带速率和高带速率,并根据分配的速 率分别对低带信号和高带信号进行自适应编码, 从而提升语音编码的整体性 能。
为了使本技术领域的人员更好地理解本发明实施例中的技术方案,并使本 发明实施例的上述目的、特征和优点能够更加明显易懂, 下面结合附图对本发 明实施例中技术方案作进一步详细的说明。
数字信号处理领域, 音频编解码器、视频编解码器广泛应用于各种电子设 备中, 例如: 移动电话, 无线装置, 个人数据助理(PDA ), 手持式或便携式 计算机, GPS接收机 /导航器, 照相机, 音频 /视频播放器, 摄像机, 录像机, 监控设备等。 通常, 这类电子设备中包括音频编码器或音频解码器, 音频编码 器或者解码器可以直接由数字电路或芯片例如 DSP ( digital signal processor ) 实现, 或者由软件代码驱动处理器执行软件代码中的流程而实现。
参见图 1 , 为本申请语音编码方法的第一实施例流程图:
步骤 101 : 将输入的音频信号分为低带信号和高带信号。
不住 102: 分别识别低带信号和高带信号的类型, 不同类型的低带信号和 高带信号分别对应不同的编码模式。
其中, 低带信号和高带信号根据其信号特点的不同进行类型划分, 例如, 低带信号可以包括语音信号和音频 audio信号, 语音信号可以进一步分为清音 段信号、 稳定浊音段信号、 一般语音帧信号、 音频帧信号和过渡帧信号等; 高 带信号可以包括噪声类信号、 时域陡变信号、 谐波性较强的信号、 具有一定谐 波性的一般信号等。
所划分的不同类型的信号对应不同的编码模式, 例如:
语音信号和音乐 audio信号分别对应的编码模式为语音编码模式和音频 audio编码模式, 其中语音编码模式包括但不限于如下模式: 对清音段信号进 行编码的 UC ( Unvoiced Coding mode, 清音编码)模式、 对稳定浊音段进行 编码的 VC ( Voiced Coding mode, 浊音编码 )模式、 对一般语音帧和音频帧进 行编码的 GC ( Generic Coding mode, 普通编码 )模式、 以及对过渡帧进行编 码的 TC ( transition Coding mode过渡编码 )模式。
高带信号对应的不同编码模式包括但不限于如下模式:对类噪声信号进行 编码的 Noise (噪声编码 )模式, 对时域陡变信号进行编码的 Transient (瞬态 编码)模式, 对谐波性较强的信号进行编码的 Harmonic (谐波编码)模式, 对具有一定谐波性的其余信号进行编码的 Normal (普通编码)模式。 Normal 模式也可根据需要和特定的编解码方法进一步分类处理。
需要说明的是,上述高带信号和低带信号的编码模式都是按照音频信号类 型的不同进行分类的, 实际应用过程中, 可以不局限于上述的分类模式, 即可 以才 据信号类型进一步细分更多的编码模式。
步骤 103: 按照低带信号和高带信号对应的不同编码模式, 将音频信号的 输入总速率自适应分配给低带信号和高带信号, 其中, 分配给低带信号的为低 带速率, 分配给高带信号的为高带速率。
具体的,可以将音频信号的输入总速率分别按照预设的低带速率或高带速 率进行逐级调整后, 分配给所述低带信号和所述高带信号。
在输入速率一定的情况下,优先保证低带信号的编码速率; 当低带信号的 类型对应的编码模式为 UC模式时,则将预设的低带速率集合中的最低速率作 为低带速率分配给所述低带信号; 当输入总速率大于等于预设的第一速率时, 首先将高带速率集合中的最低速率作为初始高带速率分配给所述高带信号;当 高带信号对应的编码模式符合速率调整的类型时,对高带速率逐级调整,将高 带信号编码模式对应的比初始高带速率高的调整速率作为高带速率分配给所 述高带信号。在其他实施方式中, 可以根据高带信号和低带信号对应的不同编 码模式做其他的调整, 优先保证低带信号的编码速率; 在输入总速率较大时, 以高带速率集合中的最低速率为起点对高带速率进行调整;在低带信号对应的 编码模式为占用速率最低的编码模式时,为低带信号分配低带速率集合中的最 低速率。
本申请实施例与现有技术的不同在于,不是按照预设的给定速率分别对低 带信号和高带信号进行编码, 而是根据低带信号和高带信号的类型,对其速率 进行自适应调整, 具体的调整过程在后续实施例中进行详细描述。
步骤 104: 通过低带信号对应的编码模式按照所分配的低带速率对低带信 号进行编码,以及通过高带信号对应的编码模式按照所分配的高带速率对高带 信号进行编码。
由上述实施例可见, 由于在对低带信号和高带信号进行编码时, 并非按照 标准中给定或编码前设定的速率进行编码,而是根据信号类型的不同自适应调 整编码速率, 因此提高了音频编码的总体性能。 参见图 2, 为应用本申请语音编码方法实施例进行编码的一种编码器结构 示意图:
该编码器包括: 分带滤波模块、 自适应比特分配模块、 高带编码模块、 低 带核心编码模块、 以及复用模块。 其中, 高带编码模块中进一步包括高带编码 分类模块和 NH个高带信号编码模块, 低带核心编码模块中进一步包括低带核 心编码分类模块和 NL个低带信号编码模块。 其中, NH个高带信号编码模块对 应 NH个高带信号类型, NL个低带信号编码模块对应 NL个低带信号类型。
其中,输入的音频信号通过分带滤波模块处理后, 分为高带信号和低带信 号, 其中, 高带信号输入高带编码模块, 由高带编码模块中的高带编码器分类 模块识别高带信号的类型,以便根据高带信号的类型为其分配高带信号编码模 块; 低带信号输入低带核心编码模块, 由低带核心编码模块中的低带编码器分 类模块识别低带信号的类型,以便根据低带信号的类型为其分配低带信号编码 模块; 同时自适应比特分配模块根据识别出的低带信号和高带信号的类型, 将 输入总速率自适应分配给低带信号和高带信号。 下面结合具体应用实施例,对自适应分配低带速率和高带速率的过程进行 详细描述。 为了方便应用实施例的描述,首先假设预先设置的音频编码输入总速率集 合中的输入总速率包括: B
Figure imgf000008_0001
共有 M种输入总速率;
预先设置低带速率集合中的低带速率包括: BU, BL2...BLP, 共有 P种低带 速率, 其中 Bu <BL2...<BLP; 预先设置高带速率集合中的高带速率包括: BH1, BH2...BHQ, 共有 Q种高带速率, 其中 BH1< BH2...<BHQ, BH1可以是 0 , 即为 了保证总体质量, 可以只编码低带信号而不编码高带信号。 上述任意低带速率 和高带速率的组合后的总速率对应于总速率集合 Bl B2,...,BM中的一个速率, ^ Bk= BLl+ BHj, 其中 i=l,2,..., P; j=l,2,...,Q; k=l,2,...,M。另夕卜也有, BM= BLP+
Figure imgf000008_0002
参见图 3, 为本申请语音编码方法的第二实施例流程图, 该实施例示出了 低带信号中仅包含语音信号的编码过程:
步骤 301: 将输入的音频信号分为低带信号和高带信号。
步骤 302: 分别识别低带信号和高带信号的类型, 不同类型的低带信号和 高带信号分别对应不同的编码模式。
本申请实施例中,低带信号中仅使用语音(speech )编码模式,例如, CELP ( Code Excited Linear Prediction, 码激励线性预测)编码。 其中, 语音编码模 式包括: 对清音段信号进行编码的 UC模式、 对稳定浊音段进行编码的 VC模 式、 对一般语音帧和音频帧进行编码的 GC模式、 以及对过渡帧进行编码的 TC模式。
不同类型的高带信号对应的编码模式包括: 对类噪声信号进行编码的 Noise模式, 对时域陡变信号进行编码的 Transient编码模式, 对谐波性较强的 信号进行编码的 Harmonic模式, 对具有一定谐波性的其余信号进行编码的 Normal模式。 Normal模式也可根据需要和特定的编解码方法进一步分类处理。
步骤 303: 判断低带信号的类型对应的编码模式是否为 UC, 若是, 则执 行步骤 304; 否则, 执行步骤 305。
步骤 304: 将预设的低带速率集合中的最低速率作为低带速率分配给低带 信号,将输入总速率减去低带速率后得到的剩余速率作为高带速率分配给高带 信号, 执行步骤 311。
当低带信号的编码模式为 UC时,假设输入总速率为 (其中 i=l, ... ,M ), 则设置低带信号的低带速率为 Bu , 相应的高带信号的高带速率为 Br Bu。 步骤 305: 判断输入总速率是否小于预设的第一速率, 若是, 则执行步骤 306; 否则, 执行步骤 307。
假设输入总速率为 (其中 i=l, ... ,M ), 则判断 是否小于预设的第一速 率, 该预设的第一速率可以是输入总速率集合中所有总速率从低到高排列后, 位于前三分之一位置处的输入总速率, 例如,输入总速率集合中按照从低到高 顺序排列的输入总速率为 B2、 B3、 B4、 B5、 B6, 则该预设的第一速率可 以设置为 B2
步骤 306: 将预设的高带速率集合中的最低速率作为高带速率分配给高带 信号,将输入总速率减去高带速率后得到的剩余速率作为低带速率分配给低带 信号, 执行步骤 311。
当输入总速率 小于预设的第一速率时, 则设置高带信号的高带速率为 BHI, 相应的低带信号的低带速率为 -
Figure imgf000009_0001
步骤 307: 将高带速率集合中的最低速率作为初始高带速率分配给高带信 号。
当低带信号的编码模式不为 UC,且输入总速率 81不小于预设的第一速率 时, 可以设置高带信号的高带速率为 ΒΗ1 , ΒΗ1是高带速率集合中的最低速率, 由此可以保证低带分配较多的速率, 从而更好地保证低带质量。
除了上述示出的设置高带信号的高带速率为 ΒΗ1外,也可以设置初始高带 速率为高带速率集合中与 B^alphal的结果临近的速率, 其中 alphal可以是一 预设值, 例如可以为 1/3; 或者, 也可以先设置低带速率为低带速率集合中与 B^alphaS的结果临近的速率, 其中 alpha2可以是以预设值, 例如可以为 2/3 , 相应初始高带速率为 Br B^alphaS a 上述对于初始高带速率的设置方式可以有 多种, 对此本申请实施例不进行限制。
步骤 308: 判断高带信号的类型对应的编码模式是否为 Harmonic模式, 若是, 则执行步骤 309; 否则, 执行步骤 310。
步骤 309: 将高带速率调整为高带速率集合中按照从低到高顺序排列时, 初始高带速率的高一级速率,将输入总速率减去该高一级速率后得到的剩余速 率作为低带速率分配给低带信号, 执行步骤 311。
当高带信号的类型对应的编码模式为 Harmonic模式时, 将高带信号的高 带速率从当前设置的 BH1顺序向上调整到 BH2, 相应的低带信号的低带速率为 Br BH2
需要说明的是, 当输入总速率 不小于预设的第一速率时, 则在进行速 率调整时,可以将高带速率从当前设置速率调整为高带速率集合中该当前设置 速率的高一级速率。 由此可知, 本申请实施例的目的在于示出速率按级调整的 方式, 并不用于限制速率初始设置的具体值。
步骤 310: 将初始高带速率作为高带速率, 并将输入总速率减去初始高带 速率后得到的剩余速率作为低带速率分配给低带信号。
当高带信号的类型对应的编码模式不为 Harmonic模式时, 则高带信号的 高带速率不进行调整, 仍然为 BH1 , 相应的低带信号的低带速率为 ΒΓ
Figure imgf000010_0001
步骤 311 : 通过低带信号对应的编码模式按照所分配的低带速率对低带信 号进行编码,以及通过高带信号对应的编码模式按照所分配的高带速率对高带 信号进行编码。
本申请对高带信号和低带信号进行编码的过程与现有技术一致,在此不再 赘述。后续,将对高带信号进行编码和对低带信号进行编码后的码流进行复用, 然后输出合成的比特流, 从而完成编码过程。 参见图 4, 为本申请语音编码方法的第三实施例流程图, 该实施例示出了 低带信号中包含语音信号和音乐信号的编码过程:
步骤 401 : 将输入的音频信号分为低带信号和高带信号。
步骤 402: 分别识别低带信号和高带信号的类型, 不同类型的低带信号和 高带信号分别对应不同的编码模式。
本申请实施例中,低带信号可以使用语音(speech )编码模式,例如, CELP 编码。 其中, 语音编码模式包括: 对清音段信号进行编码的 UC模式、 对稳定 浊音段进行编码的 VC模式、 对一般语音帧和音频帧进行编码的 GC模式、 以 及对过渡帧进行编码的 TC模式。低带信号也可以使用音频( audio )编码模式。
不同类型的高带信号对应的编码模式包括: 对类噪声信号进行编码的 Noise模式, 对时域陡变信号进行编码的 Transient编码模式, 对谐波性较强的 信号进行编码的 Harmonic模式,对具有一定谐波性的信号进行编码的 Normal 模式。 Normal模式也可根据需要和特定的编解码方法进一步分类处理。 步骤 403: 判断低带信号的类型对应的编码模式是否为 UC, 若是, 则执 行步骤 404; 否则, 执行步骤 405。
步骤 404: 将预设的低带速率集合中的最低速率作为低带速率分配给低带 信号,将输入总速率减去低带速率后得到的剩余速率作为高带速率分配给高带 信号, 执行步骤 413。
当低带信号的编码模式为 UC时,假设输入总速率为 (其中 i=l, ... ,M ), 则设置低带信号的低带速率为 Bu, 相应的高带信号的高带速率为 Br Bu
步骤 405: 判断输入总速率是否小于预设的第一速率, 若是, 则执行步骤 406; 否则, 执行步骤 407。
假设输入总速率为 (其中 i =l, ... ,M ),则判断 是否小于预设的第一速 率, 该预设的第一速率可以是输入总速率集合中所有总速率从低到高排列后, 位于前三分之一位置处的输入总速率, 例如,输入总速率集合中按照从低到高 顺序排列的输入总速率为 B2、 B3、 B4、 B5、 B6, 则该预设的第一速率可 以设置为 B2
步骤 406: 将预设的高带速率集合中的最低速率作为高带速率分配给高带 信号,将输入总速率减去高带速率后得到的剩余速率作为低带速率分配给低带 信号, 执行步骤 413。
当输入总速率 小于预设的第一速率时, 则设置高带信号的高带速率为
BHI, 相应的低带信号的低带速率为 -
Figure imgf000011_0001
步骤 407: 将高带速率集合中的最低速率作为初始高带速率分配给高带信 号。
当低带信号的编码模式不为 UC,且输入总速率 81不小于预设的第一速率 时, 可以设置高带信号的高带速率为 ΒΗ1 , ΒΗ1是高带速率集合中的最低速率, 由此可以保证低带分配较多的速率, 从而更好地保证低带质量。
除了上述示出的设置高带信号的高带速率为 ΒΗ1外,也可以设置初始高带 速率为高带速率集合中与 B^alphal的结果临近的速率, 其中 alphal可以是一 预设值, 例如可以为 1/3; 或者, 也可以先设置低带速率为低带速率集合中与 B^alphaS的结果临近的速率, 其中 alpha2可以是以预设值, 例如可以为 2/3, 相应初始高带速率为 Br
Figure imgf000011_0002
上述对于初始高带速率的设置方式可以有 多种, 对此本申请实施例不进行限制。 步骤 408: 判断是否高带信号的类型对应的编码模式为 Harmonic模式, 且低带信号的谐波性小于阈值及低带信号的类型对应的编码模式为 audio编码 模式, 若是, 则执行步骤 409; 否则, 执行步骤 410。
本实施例中判断低带信号的谐波性小于阈值是为了判断该低带信号的谐 波性是否不强。低带信号的谐波性可以通过对其进行频谱分析得到, 具体的可 以通过峰均比参数得到,峰均比参数可以是当前子带频谱的最大值和平均值的 比值, 越大表示谐波性越强, 上述谐波性强度的判断过程与现有技术一致, 在 此不再赘述。
步骤 409: 将高带速率调整为高带速率集合中按照从低到高顺序排列时, 初始高带速率的高二级速率,将输入总速率减去高二级速率后得到的剩余速率 作为低带速率分配给低带信号, 执行步骤 413。
当高带信号的类型对应的编码模式为 Harmonic模式, 且低带信号的类型 对应的编码模式为 audio模式及该低带信号的谐波性小于阈值, 则将高带信号 的高带速率从当前设置的 BH1顺序向上调整到 BH3, 相应的低带信号的低带速 率为 Br BH3
需要说明的是, 当输入总速率 不小于预设的第一速率时, 则在进行速 率调整时,可以将高带速率从当前设置速率调整为高带速率集合中该当前设置 速率的高一级速率。 由此可知, 本申请实施例的目的在于示出速率按级调整的 方式, 并不用于限制速率初始设置的具体值。
步骤 410: 判断是否高带信号的类型对应的编码模式为 Normal模式, 且 低带信号的谐波性小于阈值及低带信号的类型对应的编码模式为 audio编码模 式, 若是, 则执行步骤 411 ; 否则, 执行步骤 412。
步骤 411 : 将高带速率调整为高带速率集合中按照从低到高顺序排列时, 初始高带速率的高一级速率,将输入总速率减去高一级速率后得到的剩余速率 作为低带速率分配给低带信号, 执行步骤 413。
当高带信号的类型对应的编码模式为 Normal模式, 且低带信号的谐波性 小于阈值及低带信号的类型对应的编码模式为 audio编码模式时, 则将高带信 号的高带速率从当前设置的 BH1顺序向上调整到 BH2, 相应的低带信号的低带 速率为 ΒΓ BH2
步骤 412: 将初始高带速率作为高带速率, 并将输入总速率减去初始高带 速率后得到的剩余速率作为低带速率分配给低带信号。
步骤 413: 通过低带信号对应的编码模式按照所分配的低带速率对低带信 号进行编码,以及通过高带信号对应的编码模式按照所分配的高带速率对高带 信号进行编码。
本申请对高带信号和低带信号进行编码的过程与现有技术一致,在此不再 赘述。后续,将对高带信号进行编码和对低带信号进行编码后的码流进行复用, 然后输出合成的比特流, 从而完成编码过程。
参见图 5, 为本申请语音编码方法的第四实施例流程图, 该实施例示出了 低带信号中仅包含语音信号的另一种编码过程:
步骤 501: 将输入的音频信号分为低带信号和高带信号。
步骤 502: 分别识别低带信号和高带信号的类型, 不同类型的低带信号和 高带信号分别对应不同的编码模式。
本申请实施例中,低带信号中仅使用语音(speech )编码模式,例如, CELP 编码。 其中, 语音编码模式包括: 对清音段信号进行编码的 UC模式、 对稳定 浊音段进行编码的 VC模式、 对一般语音帧和音频帧进行编码的 GC模式、 以 及对过渡帧进行编码的 TC模式。
不同类型的高带信号对应的编码模式包括: 对类噪声信号进行编码的
Noise模式, 对时域陡变信号进行编码的 Transient编码模式, 对谐波性较强的 信号进行编码的 Harmonic模式, 对具有一定谐波性的其余信号进行编码的 Normal模式。 Normal模式也可根据需要和特定的编解码方法进一步分类处理。
步骤 503: 判断低带信号的类型对应的编码模式是否为 UC, 若是, 则执 行步骤 504; 否则, 执行步骤 505。
步骤 504: 将预设的低带速率集合中的最低速率作为低带速率分配给低带 信号,将输入总速率减去低带速率后得到的剩余速率作为高带速率分配给高带 信号, 执行步骤 513。
当低带信号的编码模式为 UC时,假设输入总速率为 (其中 i=l, ... ,M ), 则设置低带信号的低带速率为 Bu, 相应的高带信号的高带速率为 Br Bu
步骤 505: 判断输入总速率是否小于预设的第一速率, 若是, 则执行步骤 506; 否则, 执行步骤 507。
假设输入总速率为 (其中 i=l, ... ,M ), 则判断 是否小于预设的第一速 率, 该预设的第一速率可以是输入总速率集合中所有总速率从低到高排列后, 位于前三分之一位置处的输入总速率, 例如,输入总速率集合中按照从低到高 顺序排列的输入总速率为 B B2、 B3、 B4、 B5、 B6, 则该预设的第一速率可 以设置为 B2
步骤 506: 将预设的高带速率集合中的最低速率作为高带速率分配给高带 信号,将输入总速率减去高带速率后得到的剩余速率作为低带速率分配给低带 信号, 执行步骤 513。
当输入总速率 小于预设的第一速率时, 则设置高带信号的高带速率为 BH1 , 相应的低带信号的低带速率为 Br
Figure imgf000014_0001
步骤 507: 将高带速率集合中的最低速率作为初始高带速率分配给高带信 号。
当低带信号的编码模式不为 UC,且输入总速率 81不小于预设的第一速率 时, 可以设置高带信号的高带速率为 BH1 , BH1是高带速率集合中的最低速率, 由此可以保证低带分配较多的速率, 从而更好地保证低带质量。
除了上述示出的设置高带信号的高带速率为 BH1外,也可以设置初始高带 速率为高带速率集合中与 B^alphal的结果临近的速率, 其中 alphal可以是一 预设值, 例如可以为 1/3; 或者, 也可以先设置低带速率为低带速率集合中与 B^alphaS的结果临近的速率, 其中 alpha2可以是以预设值, 例如可以为 2/3 , 相应初始高带速率为 Br B^alphaS a 上述对于初始高带速率的设置方式可以有 多种, 对此本申请实施例不进行限制。
步骤 508: 判断是否低带信号的类型对应的编码模式不为 VC模式, 且高 带信号的类型对应的编码模式为 Harmonic模式, 若是, 则执行步骤 509; 否 则, 执行步骤 510。
步骤 509: 将高带速率调整为高带速率集合中按照从低到高顺序排列时, 初始高带速率的高一级速率,将输入总速率减去高一级速率后得到的剩余速率 作为低带速率分配给低带信号, 执行步骤 513。
当低带信号的类型对应的编码模式不为 VC模式,且高带信号的类型对应 的编码模式为 Harmonic模式时, 将高带信号的高带速率从当前设置的 BH1顺 序向上调整到 BH2, 相应的低带信号的低带速率为 Bi- BH
需要说明的是, 当输入总速率 不小于预设的第一速率时, 则在进行速 率调整时,可以将高带速率从当前设置速率调整为高带速率集合中该当前设置 速率的高一级速率。 由此可知, 本申请实施例的目的在于示出速率按级调整的 方式, 并不用于限制速率初始设置的具体值。
步骤 510: 判断是否低带信号的类型对应的编码模式为 VC模式, 且高带 信号的类型对应的编码模式为 Noise模式, 若是, 则返回步骤 511 ; 否则, 执 行步骤 512。
步骤 511 : 将高带速率调整为高带速率集合中按照从低到高顺序排列时, 初始高带速率的高一级速率,将输入总速率减去高一级速率后得到的剩余速率 作为低带速率分配给低带信号, 执行步骤 513。
当低带信号的类型对应的编码模式为 VC模式,且高带信号的类型对应的 编码模式为 Noise模式时, 将高带信号的高带速率从当前设置的 BH1顺序向上 调整到 BH2, 相应的低带信号的低带速率为 ΒΓ
Figure imgf000015_0001
需要说明的是, 当初始设置的高带速率不是高带速率集合中的最低速率, 则在进行速率调整时,可以将最高速率从当前设置速率调整为高带速率集合中 该当前设置速率的高一级速率。 由此可知, 本申请实施例的目的在于示出速率 按级调整的方式, 并不用于限制速率初始设置的具体值。
步骤 512: 将输入总速率减去初始高带速率后得到的剩余速率作为低带速 率分配给低带信号。
当低带信号的类型对应的编码模式为 VC模式,且高带信号的类型对应的 编码模式不为 Harmonic模式也不为 Noise模式时, 则高带信号的高带速率不 进行调整, 仍然为 BH1, 相应的低带信号的低带速率为 Br
Figure imgf000015_0002
步骤 513: 通过低带信号对应的编码模式按照所分配的低带速率对低带信 号进行编码,以及通过高带信号对应的编码模式按照所分配的高带速率对高带 信号进行编码。
本申请对高带信号和低带信号进行编码的过程与现有技术一致,在此不再 赘述。后续,将对高带信号进行编码和对低带信号进行编码后的码流进行复用, 然后输出合成的比特流, 从而完成编码过程。 参见图 6, 为本申请语音编码方法的第五实施例流程图, 该实施例示出了 低带信号中仅包含语音信号的另一种编码过程: 步骤 601 : 将输入的音频信号分为低带信号和高带信号。
步骤 602: 分别识别低带信号和高带信号的类型, 不同类型的低带信号和 高带信号分别对应不同的编码模式。
本申请实施例中,低带信号中仅使用语音(speech )编码模式,例如, CELP 编码。 其中, 语音编码模式包括: 对清音段信号进行编码的 UC模式、 对稳定 浊音段进行编码的 VC模式、 对一般语音帧和音频帧进行编码的 GC模式、 以 及对过渡帧进行编码的 TC模式。
不同类型的高带信号对应的编码模式包括: 对类噪声信号进行编码的 Noise模式, 对时域陡变信号进行编码的 Transient编码模式, 对谐波性较强的 信号进行编码的 Harmonic模式, 对具有一定谐波性的其余信号进行编码的 Normal模式。 Normal模式也可根据需要和特定的编解码方法进一步分类处理。
步骤 603: 判断低带信号的类型对应的编码模式是否为 UC, 若是, 则执 行步骤 604; 否则, 执行步骤 605。
步骤 604: 将预设的低带速率集合中的最低速率作为低带速率分配给低带 信号,将输入总速率减去低带速率后得到的剩余速率作为高带速率分配给高带 信号, 执行步骤 614。
当低带信号的编码模式为 UC时,假设输入总速率为 (其中 i=l, ... ,M ), 则设置低带信号的低带速率为 BU , 相应的高带信号的高带速率为 BR BU
步骤 605: 判断输入总速率是否小于预设的第一速率, 若是, 则执行步骤 606; 否则, 执行步骤 607。
假设输入总速率为 (其中 i=l, ... ,M ), 则判断 是否小于预设的第一速 率, 该预设的第一速率可以是输入总速率集合中所有总速率从低到高排列后, 位于前三分之一位置处的输入总速率, 例如,输入总速率集合中按照从低到高 顺序排列的输入总速率为 B2、 B3、 B4、 B5、 B6, 则该预设的第一速率可 以设置为 B2
步骤 606: 将预设的高带速率集合中的最低速率作为高带速率分配给高带 信号,将输入总速率减去高带速率后得到的剩余速率作为低带速率分配给低带 信号, 执行步骤 614。
当输入总速率 小于预设的第一速率时, 则设置高带信号的高带速率为 BH1 , 相应的低带信号的低带速率为 - ΒΗ^ 步骤 607: 将高带速率集合中的最低速率作为当前高带速率分配给高带信 号, 相应当前低带速率为输入总速率减去当前高带速率。
当低带信号的编码模式不为 UC,且输入总速率 81不小于预设的第一速率 时, 可以设置高带信号的当前高带速率为 BH1, BH1是高带速率集合中最低的 速率, 相应的低带信号的当前低带速率为 - BH1
除了上述示出的设置高带信号的当前高带速率为 BH1外,也可以设置当前 高带速率为高带速率集合中与 B^alphal的结果临近的速率, 其中 alphal可以 是一预设值, 例如可以为 1/3; 或者, 也可以先设置当前低带速率为低带速率 集合中与 B^alphaS的结果临近的速率, 其中 alpha2可以是以预设值, 例如可 以为 2/3, 相应当前高带速率为 Br
Figure imgf000017_0001
上述对于当前高带速率的设置 方式可以有多种, 对此本申请实施例不进行限制。
步骤 608: 通过低带信号对应的编码模式按照初始低带速率对低带信号进 行编码,得到本地低带合成信号, 并计算本地低带合成信号的信噪比 SNR值。
步骤 609: 判断 SNR值是否在预设范围内, 若否, 则执行步骤 610; 若是, 执行步骤 614。
步骤 610: 当 SNR值小于预设范围的最小值时, 将低带速率调整为低带 速率集合中按照从低到高顺序排列时, 当前低带速率的高一级速率, 当 SNR 值大于预设范围的最大值时,将低带速率调整为低带速率集合中按照从低到高 顺序排列时, 当前低带速率的低一级速率。
步骤 611: 通过低带信号对应的编码模式按照调整后的低带速率对低带信 号进行编码,得到本地低带合成信号,并重新计算该本地低带合成信号的 SNR 值。
步骤 612: 判断重新计算的 SNR值是否在预设范围内, 若否, 返回步骤 610; 若是, 则执行步骤 613。
步骤 613: 将调整后的低带速率作为低带信号的低带速率, 相应的输入总 速率减去调整后的低带速率作为高带信号的高带速率。
步骤 614: 通过低带信号对应的编码模式按照所分配的低带速率对低带信 号进行编码,以及通过高带信号对应的编码模式按照所分配的高带速率对高带 信号进行编码。
本申请对高带信号和低带信号进行编码的过程与现有技术一致,在此不再 赘述。后续,将对高带信号进行编码和对低带信号进行编码后的码流进行复用, 然后输出合成的比特流, 从而完成编码过程。 上述音频编码方法第二实施例至第五实施例中,在判断输入总速率不小于 预设的第一速率后, 还可以进一步判断输入总速率是否大于预设的第二速率, 当大于该第二速率时,可以设置高带信号的高带速率为预设高带速率集合中最 高的速率,将输入总速率减去设置的高带速率,得到的剩余速率作为低带速率 分配给低带信号,对于输入总速率在由上述两个预设速率限定的范围内时,再 进行原输入总速率小于预设的第一速率后的自适应调整过程。 与本申请音频编码方法的实施例相对应,本申请还提供了音频编码装置的 实施例。
参见图 7, 为本申请音频编码装置的实施例框图。
该音频编码装置包括: 分带单元 710、识别单元 720、 自适应调整单元 730 和编码单元 740。
其中, 分带单元 710, 用于将输入的音频信号分为低带信号和高带信号; 识别单元 720, 用于分别识别所述低带信号和高带信号的类型, 不同类型 的低带信号和高带信号分别对应不同的编码模式;
自适应调整单元 730, 用于按照所述低带信号和高带信号对应的不同编码 模式, 将所述音频信号的输入总速率自适应分配给所述低带信号和高带信号, 其中,分配给所述低带信号的为低带速率,分配给所述高带信号的为高带速率; 编码单元 740, 用于通过所述低带信号对应的编码模式按照所述低带速率 对所述低带信号进行编码,以及通过所述高带信号对应的编码模式按照所述高 带速率对所述高带信号进行编码。
其中,所述不同类型的低带信号对应的编码模式包括语音编码模式和音乐 audio编码模式, 其中语音编码模式包括: 过渡编码 TC模式、 普通编码 GC 模式、 浊音编码 VC模式、 清音编码 UC模式; 不同类型的高带信号对应的编 码模式包括:噪声编码 Noise模式、瞬态编码 Transient模式,谐波编码 Harmonic 模式, 普通编码 Normal模式。 另外, Normal模式也可根据需要和特定的编解 码方法进一步分类处理。 需要说明的是, 上述高带信号和低带信号的编码模式 都是按照音频信号类型的不同进行分类的, 实际应用过程中, 可以不局限于上 述的分类模式, 即可以^^据信号类型进一步细分更多的编码模式。
进一步, 自适应调整单元可以包括(图 7中未示出): 第一速率分配单元, 用于将预设的高带速率集合中的最低速率作为高带速率分配给所述高带信号, 将所述输入总速率减去所述高带速率后得到的剩余速率作为低带速率分配给 所述低带信号;
所述第一速率分配单元,具体用于当所述低带信号的类型对应的编码模式 不为 UC模式时,将预设的高带速率集合中的最低速率作为高带速率分配给所 述高带信号, 当所述低带信号的类型对应的编码模式为 UC模式时, 将预设的 低带速率集合中的最低速率作为低带速率分配给所述低带信号,将所述输入总 速率减去所述高带速率后得到的剩余速率作为低带速率分配给所述低带信号。
所述第一速率分配单元可以进一步包括: 初始高带速率分配单元, 用于当 所述输入总速率大于等于预设的第一速率时,将所述高带速率集合中的最低速 率作为初始高带速率分配给所述高带信号; 速率分配调整单元, 用于当高带信 号对应的编码模式符合速率调整的类型时,将高带信号编码模式对应的比所述 初始高带速率高的调整速率作为高带速率分配给所述高带信号,将所述输入总 速率减去所述高带速率后得到的剩余速率作为低带速率分配给所述低带信号。
进一步, 自适应调整单元可以包括(图 7中未示出): 判断单元和速率分 配单元, 其中, 所述速率分配单元, 用于当所述判断单元判断所述低带信号的 类型对应的编码模式为 UC模式时,将预设的低带速率集合中的最低速率作为 低带速率分配给所述低带信号,以及将所述输入总速率减去所述低带速率后得 到的剩余速率作为高带速率分配给所述高带信号。
进一步, 所述速率分配单元,还用于当所述判断单元判断所述低带信号的 类型对应的编码模式不为 UC模式, 且所述输入总速率小于预设的第一速率 时, 将预设的高带速率集合中的最低速率作为高带速率分配给所述高带信号, 以及将所述输入总速率减去所述高带速率后得到的剩余速率作为低带速率分 配给所述低带信号。
进一步, 自适应调整单元还可以包括(图 7中未示出): 第一速率调整单 元, 其中, 所述速率分配单元, 还用于当所述判断单元判断所述输入总速率不 小于所述第一速率时,将所述高带速率集合中的最低速率作为初始高带速率分 配给所述高带信号; 所述判断单元,还用于判断所述高带信号的类型对应的编 码模式是否为 Harmonic模式; 所述第一速率调整单元, 用于当所述判断单元 判断为是时, 将高带速率调整为所述高带速率集合中按照从低到高顺序排列 时, 所述初始高带速率的高一级速率, 将所述输入总速率减去所述高一级速率 后得到的剩余速率作为低带速率分配给所述低带信号; 所述速率分配单元,还 用于当所述判断单元判断为否时,将所述初始高带速率作为高带速率, 并将所 述输入总速率减去所述初始高带速率后得到的剩余速率作为低带速率分配给 所述低带信号。
进一步, 自适应调整单元还可以包括(图 7中未示出): 第二速率调整单 元, 其中, 所述速率分配单元, 还用于当所述判断单元判断所述输入总速率不 小于所述第一速率时,将所述高带速率集合中的最低速率作为初始高带速率分 配给所述高带信号; 所述判断单元,还用于判断是否所述高带信号的类型对应 的编码模式为 Harmonic模式, 且所述低带信号的谐波性小于阈值及所述低带 信号的类型对应的编码模式为 audio编码模式; 所述第二速率调整单元, 用于 当所述判断单元判断为是时,将高带速率调整为所述高带速率集合中按照从低 到高顺序排列时, 所述初始高带速率的高二级速率,将所述输入总速率减去所 述高二级速率后得到的剩余速率作为低带速率分配给所述低带信号;所述判断 单元,还用于当所述判断单元判断为否时, 判断是否高带信号的类型对应的编 码模式为 Normal模式, 且所述低带信号的谐波性小于阈值及所述低带信号的 类型对应的编码模式为 audio编码模式; 所述第二速率调整单元, 还用于当所 述判断单元判断为是时,将高带速率调整为所述高带速率集合中按照从低到高 顺序排列时, 所述初始高带速率的高一级速率,将所述输入总速率减去所述高 一级速率后得到的剩余速率作为低带速率分配给所述低带信号;所述速率分配 单元,还用于当所述判断单元判断为否时,将所述初始高带速率作为高带速率, 并将所述输入总速率减去所述初始高带速率后得到的剩余速率作为低带速率 分配给所述低带信号。
进一步, 自适应调整单元还可以包括(图 7中未示出): 第三速率调整单 元, 其中, 所述速率分配单元, 还用于当所述判断单元判断所述输入总速率不 小于所述第一速率时,将所述高带速率集合中的最低速率作为初始高带速率分 配给所述高带信号; 所述判断单元,还用于判断是否低带信号的类型对应的编 码模式不为 VC模式, 且高带信号的类型对应的编码模式为 Harmonic模式; 所述第三速率调整单元, 用于当所述判断单元判断为是时,将高带速率调整为 所述高带速率集合中按照从低到高顺序排列时,所述初始高带速率的高一级速 率,将所述输入总速率减去所述高一级速率后得到的剩余速率作为低带速率分 配给所述低带信号; 所述判断单元, 还用于当所述判断单元判断为否时, 判断 是否低带信号的类型对应的编码模式为 VC模式,且高带信号的类型对应的编 码模式为 Noise模式; 所述第三速率调整单元, 还用于当所述判断单元判断为 是时,将高带速率调整为所述高带速率集合中按照从低到高顺序排列时, 所述 初始高带速率的高一级速率,将输入总速率减去所述高一级速率后得到的剩余 速率作为低带速率分配给低带信号; 所述速率分配单元,还用于当所述判断单 元判断为否时,则将所述输入总速率减去所述初始高带速率后得到的剩余速率 作为低带速率分配给所述低带信号。
进一步, 自适应调整单元还可以包括(图 7中未示出): 第四速率调整单 元和 SNR计算单元, 其中, 所述速率分配单元, 还用于当判断单元判断所述 输入总速率不小于所述第一速率时,将高带速率集合中的最低速率作为当前高 带速率分配给所述高带信号,相应当前低带速率为输入总速率减去所述当前高 带速率; 所述 SNR计算单元, 用于通过所述低带信号对应的编码模式按照所 述初始低带速率对所述低带信号进行编码,得到本地低带合成信号, 并计算所 述本地低带合成信号的 SNR值; 所述判断单元, 还用于判断所述 SNR值是否 在预设范围内; 所述速率分配单元, 还用于当所述判断单元判断为是时, 将所 述初始高带速率作为所述高带信号的高带速率,将所述初始低带速率作为所述 低带信号的低带速率; 所述第四速率调整单元, 用于当所述 SNR值小于所述 预设范围的最小值时,将低带速率调整为低带速率集合中按照从低到高顺序排 列时, 当前低带速率的高一级速率, 当所述 SNR值大于所述预设范围的最大 值时,将低带速率调整为低带速率集合中按照从低到高顺序排列时, 当前低带 速率的低一级速率; 所述 SNR计算单元, 还用于通过低带信号对应的编码模 式按照调整后的低带速率对低带信号进行编码,得到本地低带合成信号, 并重 新计算该本地低带合成信号的 SNR值; 所述判断单元, 还用于判断重新计算 的 SNR值是否在所述预设范围内; 所述速率分配单元, 还用于当所述判断单 元判断为是时,将调整后的低带速率作为低带信号的低带速率,相应的输入总 速率减去调整后的低带速率作为高带信号的高带速率; 所述第四速率调整单 元,还用于当所述判断单元判断为否时, 重复执行所述第四速率调整单元的功 h
匕。
进一步, 所述判断单元,还用于在判断所述输入总速率不小于所述第一速 率后, 判断所述输入总速率是否大于预设的第二速率; 以及, 所述速率分配单 元,还用于当所述判断单元判断为是时,将高带速率集合中的最高速率作为高 带速率分配给高带信号,将所述输入总速率减去所述最高速率后得到的剩余速 率作为低带速率分配给所述低带信号。
通过对以上实施方式的描述可知,本申请实施例中将输入的音频信号分为 低带信号和高带信号,按照低带信号和高带信号对应的不同编码模式,将音频 信号的输入总速率自适应分配给低带信号和高带信号,通过低带信号对应的编 码模式按照低带速率对低带信号进行编码,并通过高带信号对应的编码模式按 照高带速率对高带信号进行编码。由于本申请实施例中在对低带信号和高带信 号进行编码时, 并非按照标准中给定的速率进行编码, 而是根据信号类型的不 同自适应调整编码速率, 因此提高了音频编码的总体性能。
本领域的技术人员可以清楚地了解到本发明实施例中的技术可借助软件 加必需的通用硬件平台的方式来实现。基于这样的理解, 本发明实施例中的技 术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现 出来, 该计算机软件产品可以存储在存储介质中, 如 ROM/RAM、 磁碟、 光盘 等, 包括若干指令用以使得一台计算机设备(可以是个人计算机, 服务器, 或 者网络设备等)执行本发明各个实施例或者实施例的某些部分所述的方法。
本说明书中的各个实施例均采用递进的方式描述,各个实施例之间相同相 似的部分互相参见即可, 每个实施例重点说明的都是与其他实施例的不同之 处。 尤其, 对于系统实施例而言, 由于其基本相似于方法实施例, 所以描述的 比较筒单, 相关之处参见方法实施例的部分说明即可。
以上所述的本发明实施方式, 并不构成对本发明保护范围的限定。任何在 本发明的精神和原则之内所作的修改、等同替换和改进等, 均应包含在本发明 的保护范围之内。

Claims

权 利 要 求
1、 一种音频编码方法, 其特征在于, 包括:
将输入的音频信号分为低带信号和高带信号;
分别识别所述低带信号和高带信号的类型,不同类型的低带信号和高带信 号分别对应不同的编码模式;
按照所述低带信号和高带信号对应的不同编码模式,将所述音频信号的输 入总速率自适应分配给所述低带信号和高带信号, 其中, 分配给所述低带信号 的为低带速率, 分配给所述高带信号的为高带速率;
通过所述低带信号对应的编码模式按照所述低带速率对所述低带信号进 行编码,以及通过所述高带信号对应的编码模式按照所述高带速率对所述高带 信号进行编码。
2、 根据权利要求 1所述的方法, 其特征在于, 所述将所述音频信号的输 入总速率自适应分配给所述低带信号和高带信号包括:
将预设的高带速率集合中的最低速率作为高带速率分配给所述高带信号, 将所述输入总速率减去所述高带速率后得到的剩余速率作为低带速率分配给 所述低带信号。
3、 根据权利要求 2所述的方法, 其特征在于, 将预设的高带速率集合中 的最低速率作为高带速率分配给所述高带信号包括:
当所述低带信号的类型对应的编码模式不为清音编码 UC模式时,将预设 的高带速率集合中的最低速率作为高带速率分配给所述高带信号。
4、 根据权利要求 3所述的方法, 其特征在于, 还包括:
当所述低带信号的类型对应的编码模式为 UC模式时,将预设的低带速率 集合中的最低速率作为低带速率分配给所述低带信号,将所述输入总速率减去 所述高带速率后得到的剩余速率作为低带速率分配给所述低带信号。
5、 根据权利要求 4所述的方法, 其特征在于, 还包括:
当所述输入总速率大于等于预设的第一速率时,将所述高带速率集合中的 最低速率作为初始高带速率分配给所述高带信号;
当高带信号对应的编码模式符合速率调整的类型时,将高带信号编码模式 对应的比所述初始高带速率高的调整速率作为高带速率分配给所述高带信号, 将所述输入总速率减去所述高带速率后得到的剩余速率作为低带速率分配给 所述低带信号。
6、 根据权利要求 1所述的方法, 其特征在于, 所述按照所述低带信号和 高带信号对应的不同编码模式,将所述音频信号的输入总速率自适应分配给所 述低带信号和高带信号包括:
当所述低带信号的类型对应的编码模式为 UC模式时,将预设的低带速率 集合中的最低速率作为低带速率分配给所述低带信号;
将所述输入总速率减去所述低带速率后得到的剩余速率作为高带速率分 配给所述高带信号。
7、 根据权利要求 6所述的方法, 其特征在于, 还包括:
当所述低带信号的类型对应的编码模式不为 UC模式,且所述输入总速率 小于预设的第一速率时,将预设的高带速率集合中的最低速率作为高带速率分 配给所述高带信号;
将所述输入总速率减去所述高带速率后得到的剩余速率作为低带速率分 配给所述低带信号。
8、 根据权利要求 7所述的方法, 其特征在于, 还包括:
当判断所述输入总速率不小于所述第一速率时,将所述高带速率集合中的 最低速率作为初始高带速率分配给所述高带信号;
判断所述高带信号的类型对应的编码模式是否为谐波编码 Harmonic模 式;
当判断为是,则将高带速率调整为所述高带速率集合中按照从低到高顺序 排列时, 所述初始高带速率的高一级速率,将所述输入总速率减去所述高一级 速率后得到的剩余速率作为低带速率分配给所述低带信号;
当判断为否, 则将所述初始高带速率作为高带速率, 并将所述输入总速率 减去所述初始高带速率后得到的剩余速率作为低带速率分配给所述低带信号。
9、 根据权利要求 7所述的方法, 其特征在于, 还包括:
当判断所述输入总速率不小于所述第一速率时,将所述高带速率集合中的 最低速率作为初始高带速率分配给所述高带信号;
判断是否所述高带信号的类型对应的编码模式为 Harmonic模式, 且所述 低带信号的谐波性小于阈值及所述低带信号的类型对应的编码模式为音频 audio编码模式; 当判断为是,则将高带速率调整为所述高带速率集合中按照从低到高顺序 排列时, 所述初始高带速率的高二级速率,将所述输入总速率减去所述高二级 速率后得到的剩余速率作为低带速率分配给所述低带信号;
当判断为否, 则判断是否高带信号的类型对应的编码模式为普通编码 Normal模式, 且所述低带信号的谐波性小于阈值及所述低带信号的类型对应 的编码模式为 audio编码模式;
当判断为是,则将高带速率调整为所述高带速率集合中按照从低到高顺序 排列时, 所述初始高带速率的高一级速率,将所述输入总速率减去所述高一级 速率后得到的剩余速率作为低带速率分配给所述低带信号;
当判断为否, 则将所述初始高带速率作为高带速率, 并将所述输入总速率 减去所述初始高带速率后得到的剩余速率作为低带速率分配给所述低带信号。
10、 根据权利要求 7所述的方法, 其特征在于, 还包括:
当判断所述输入总速率不小于所述第一速率时,将所述高带速率集合中的 最低速率作为初始高带速率分配给所述高带信号;
判断是否低带信号的类型对应的编码模式不为浊音编码 VC模式,且高带 信号的类型对应的编码模式为 Harmonic模式;
当判断为是,则将高带速率调整为所述高带速率集合中按照从低到高顺序 排列时, 所述初始高带速率的高一级速率,将所述输入总速率减去所述高一级 速率后得到的剩余速率作为低带速率分配给所述低带信号;
当判断为否时, 判断是否低带信号的类型对应的编码模式为 VC模式, 且 高带信号的类型对应的编码模式为噪声编码 Noise模式;
当判断为是,则将高带速率调整为所述高带速率集合中按照从低到高顺序 排列时, 所述初始高带速率的高一级速率,将输入总速率减去所述高一级速率 后得到的剩余速率作为低带速率分配给低带信号;
当判断为否,则将所述输入总速率减去所述初始高带速率后得到的剩余速 率作为低带速率分配给所述低带信号。
11、 根据权利要求 7所述的方法, 其特征在于, 还包括:
当判断所述输入总速率不小于所述第一速率时,将高带速率集合中的最低 速率作为当前高带速率分配给所述高带信号,相应当前低带速率为输入总速率 减去所述当前高带速率; 通过所述低带信号对应的编码模式按照所述初始低带速率对所述低带信 号进行编码,得到本地低带合成信号, 并计算所述本地低带合成信号的信噪比 SNR值;
判断所述 SNR值是否在预设范围内;
当判断为是, 则将所述初始高带速率作为所述高带信号的高带速率,将所 述初始低带速率作为所述低带信号的低带速率;
当判断为否, 则执行下述调整步骤: 当所述 SNR值小于所述预设范围的 最小值时,将低带速率调整为低带速率集合中按照从低到高顺序排列时, 当前 低带速率的高一级速率, 当所述 SNR值大于所述预设范围的最大值时, 将低 带速率调整为低带速率集合中按照从低到高顺序排列时,当前低带速率的低一 级速率;
通过低带信号对应的编码模式按照调整后的低带速率对低带信号进行编 码, 得到本地低带合成信号, 并重新计算该本地低带合成信号的 SNR值; 判断重新计算的 SNR值是否在所述预设范围内;
当判断为是, 则将调整后的低带速率作为低带信号的低带速率,相应的输 入总速率减去调整后的低带速率作为高带信号的高带速率;
当判断为否, 则返回执行所述调整步骤。
12、 根据权利要求 8至 11任意一项所述的方法, 其特征在于, 在判断所 述输入总速率不小于所述第一速率后, 还包括:
判断所述输入总速率是否大于预设的第二速率;
当判断为是,则将高带速率集合中的最高速率作为高带速率分配给高带信 号,将所述输入总速率减去所述最高速率后得到的剩余速率作为低带速率分配 给所述低带信号;
当判断为否,则执行所述将高带速率集合中的最低速率分配给所述高带信 号的步骤。
13、 一种音频编码装置, 其特征在于, 包括:
分带单元, 用于将输入的音频信号分为低带信号和高带信号;
识别单元, 用于分别识别所述低带信号和高带信号的类型, 不同类型的低 带信号和高带信号分别对应不同的编码模式; 自适应调整单元, 用于按照所述低带信号和高带信号对应的不同编码模 式,将所述音频信号的输入总速率自适应分配给所述低带信号和高带信号, 其 中, 分配给所述低带信号的为低带速率, 分配给所述高带信号的为高带速率; 编码单元,用于通过所述低带信号对应的编码模式按照所述低带速率对所 述低带信号进行编码,以及通过所述高带信号对应的编码模式按照所述高带速 率对所述高带信号进行编码。
14、 根据权利要求 13所述的装置, 其特征在于, 所述自适应调整单元包 括:
第一速率分配单元,用于将预设的高带速率集合中的最低速率作为高带速 率分配给所述高带信号,将所述输入总速率减去所述高带速率后得到的剩余速 率作为低带速率分配给所述低带信号。
15、 根据权利要求 14所述的装置, 其特征在于, 所述第一速率分配单元, 具体用于当所述低带信号的类型对应的编码模式不为清音编码 UC模式时,将 预设的高带速率集合中的最低速率作为高带速率分配给所述高带信号,当所述 低带信号的类型对应的编码模式为 UC模式时,将预设的低带速率集合中的最 低速率作为低带速率分配给所述低带信号,将所述输入总速率减去所述高带速 率后得到的剩余速率作为低带速率分配给所述低带信号。
16、 根据权利要求 15所述的装置, 其特征在于, 所述第一速率分配单元 包括:
初始高带速率分配单元,用于当所述输入总速率大于等于预设的第一速率 时, 将所述高带速率集合中的最低速率作为初始高带速率分配给所述高带信 号;
速率分配调整单元,用于当高带信号对应的编码模式符合速率调整的类型 时,将高带信号编码模式对应的比所述初始高带速率高的调整速率作为高带速 率分配给所述高带信号,将所述输入总速率减去所述高带速率后得到的剩余速 率作为低带速率分配给所述低带信号。
17、 根据权利要求 13所述的装置, 其特征在于, 所述自适应调整单元包 括: 判断单元和速率分配单元,
所述速率分配单元,用于当所述判断单元判断所述低带信号的类型对应的 编码模式为 UC模式时,将预设的低带速率集合中的最低速率作为低带速率分 配给所述低带信号,以及将所述输入总速率减去所述低带速率后得到的剩余速 率作为高带速率分配给所述高带信号。
18、 根据权利要求 17所述的装置, 其特征在于,
所述速率分配单元,还用于当所述判断单元判断所述低带信号的类型对应 的编码模式不为 UC模式, 且所述输入总速率小于预设的第一速率时, 将预设 的高带速率集合中的最低速率作为高带速率分配给所述高带信号,以及将所述 输入总速率减去所述高带速率后得到的剩余速率作为低带速率分配给所述低 带信号。
19、 根据权利要求 17所述的装置, 其特征在于, 所述自适应调整单元还 包括: 第一速率调整单元,
所述速率分配单元,还用于当所述判断单元判断所述输入总速率不小于所 述第一速率时,将所述高带速率集合中的最低速率作为初始高带速率分配给所 述高带信号;
所述判断单元,还用于判断所述高带信号的类型对应的编码模式是否为谐 波编码 Harmonic模式;
所述第一速率调整单元,用于当所述判断单元判断为是时,将高带速率调 整为所述高带速率集合中按照从低到高顺序排列时,所述初始高带速率的高一 级速率,将所述输入总速率减去所述高一级速率后得到的剩余速率作为低带速 率分配给所述低带信号;
所述速率分配单元,还用于当所述判断单元判断为否时,将所述初始高带 速率作为高带速率,并将所述输入总速率减去所述初始高带速率后得到的剩余 速率作为低带速率分配给所述低带信号。
20、 根据权利要求 17所述的装置, 其特征在于, 所述自适应调整单元还 包括: 第二速率调整单元,
所述速率分配单元,还用于当所述判断单元判断所述输入总速率不小于所 述第一速率时,将所述高带速率集合中的最低速率作为初始高带速率分配给所 述高带信号;
所述判断单元, 还用于判断是否所述高带信号的类型对应的编码模式为 Harmonic模式, 且所述低带信号的谐波性小于阈值及所述低带信号的类型对 应的编码模式为音频 audio编码模式; 所述第二速率调整单元, 用于当所述判断单元判断为是时,将高带速率调 整为所述高带速率集合中按照从低到高顺序排列时,所述初始高带速率的高二 级速率,将所述输入总速率减去所述高二级速率后得到的剩余速率作为低带速 率分配给所述低带信号;
所述判断单元,还用于当所述判断单元判断为否时, 判断是否高带信号的 类型对应的编码模式为普通编码 Normal模式, 且所述低带信号的谐波性小于 阈值及所述低带信号的类型对应的编码模式为 audio编码模式;
所述第二速率调整单元,还用于当所述判断单元判断为是时,将高带速率 调整为所述高带速率集合中按照从低到高顺序排列时,所述初始高带速率的高 一级速率,将所述输入总速率减去所述高一级速率后得到的剩余速率作为低带 速率分配给所述低带信号;
所述速率分配单元,还用于当所述判断单元判断为否时,将所述初始高带 速率作为高带速率,并将所述输入总速率减去所述初始高带速率后得到的剩余 速率作为低带速率分配给所述低带信号。
21、 根据权利要求 17所述的装置, 其特征在于, 所述自适应调整单元还 包括: 第三速率调整单元,
所述速率分配单元,还用于当所述判断单元判断所述输入总速率不小于所 述第一速率时,将所述高带速率集合中的最低速率作为初始高带速率分配给所 述高带信号;
所述判断单元,还用于判断是否低带信号的类型对应的编码模式不为浊音 编码 VC模式, 且高带信号的类型对应的编码模式为 Harmonic模式;
所述第三速率调整单元, 用于当所述判断单元判断为是时,将高带速率调 整为所述高带速率集合中按照从低到高顺序排列时,所述初始高带速率的高一 级速率,将所述输入总速率减去所述高一级速率后得到的剩余速率作为低带速 率分配给所述低带信号;
所述判断单元,还用于当所述判断单元判断为否时, 判断是否低带信号的 类型对应的编码模式为 VC模式,且高带信号的类型对应的编码模式为噪声编 码 Noise模式;
所述第三速率调整单元,还用于当所述判断单元判断为是时,将高带速率 调整为所述高带速率集合中按照从低到高顺序排列时,所述初始高带速率的高 一级速率,将输入总速率减去所述高一级速率后得到的剩余速率作为低带速率 分配给低带信号;
所述速率分配单元,还用于当所述判断单元判断为否时, 则将所述输入总 速率减去所述初始高带速率后得到的剩余速率作为低带速率分配给所述低带 信号。
22、 根据权利要求 17所述的装置, 其特征在于, 所述自适应调整单元还 包括: 第四速率调整单元和信噪比 SNR计算单元,
所述速率分配单元,还用于当判断单元判断所述输入总速率不小于所述第 一速率时,将高带速率集合中的最低速率作为当前高带速率分配给所述高带信 号, 相应当前低带速率为输入总速率减去所述当前高带速率;
所述 SNR计算单元, 用于通过所述低带信号对应的编码模式按照所述初 始低带速率对所述低带信号进行编码,得到本地低带合成信号, 并计算所述本 地低带合成信号的 SNR值;
所述判断单元, 还用于判断所述 SNR值是否在预设范围内;
所述速率分配单元,还用于当所述判断单元判断为是时,将所述初始高带 速率作为所述高带信号的高带速率,将所述初始低带速率作为所述低带信号的 低带速率;
所述第四速率调整单元, 用于当所述 SNR值小于所述预设范围的最小值 时,将低带速率调整为低带速率集合中按照从低到高顺序排列时, 当前低带速 率的高一级速率, 当所述 SNR值大于所述预设范围的最大值时, 将低带速率 调整为低带速率集合中按照从低到高顺序排列时, 当前低带速率的低一级速 率;
所述 SNR计算单元, 还用于通过低带信号对应的编码模式按照调整后的 低带速率对低带信号进行编码,得到本地低带合成信号, 并重新计算该本地低 带合成信号的 SNR值;
所述判断单元, 还用于判断重新计算的 SNR值是否在所述预设范围内; 所述速率分配单元,还用于当所述判断单元判断为是时,将调整后的低带 速率作为低带信号的低带速率,相应的输入总速率减去调整后的低带速率作为 高带信号的高带速率;
所述第四速率调整单元,还用于当所述判断单元判断为否时, 重复执行所 述第四速率调整单元的功能。
23、 根据权利要求 19至 22任意一项所述的装置, 其特征在于, 所述判断单元,还用于在判断所述输入总速率不小于所述第一速率后, 判 断所述输入总速率是否大于预设的第二速率;
所述速率分配单元,还用于当所述判断单元判断为是时,将高带速率集合 中的最高速率作为高带速率分配给高带信号,将所述输入总速率减去所述最高 速率后得到的剩余速率作为低带速率分配给所述低带信号。
+
PCT/CN2011/084816 2011-04-13 2011-12-28 一种音频编码方法及装置 WO2012139401A1 (zh)

Priority Applications (4)

Application Number Priority Date Filing Date Title
JP2013552820A JP2014509408A (ja) 2011-04-13 2011-12-28 オーディオ符号化方法および装置
KR1020137018875A KR20130116899A (ko) 2011-04-13 2011-12-28 오디오 코딩 방법 및 장치
EP11863610.9A EP2647974A4 (en) 2011-04-13 2011-12-28 AUDIO CODING METHOD AND DEVICE
US14/010,103 US20130346088A1 (en) 2011-04-13 2013-08-26 Audio coding method and apparatus

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201110092203.4A CN102737636B (zh) 2011-04-13 2011-04-13 一种音频编码方法及装置
CN201110092203.4 2011-04-13

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US14/010,103 Continuation US20130346088A1 (en) 2011-04-13 2013-08-26 Audio coding method and apparatus

Publications (1)

Publication Number Publication Date
WO2012139401A1 true WO2012139401A1 (zh) 2012-10-18

Family

ID=46993009

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2011/084816 WO2012139401A1 (zh) 2011-04-13 2011-12-28 一种音频编码方法及装置

Country Status (6)

Country Link
US (1) US20130346088A1 (zh)
EP (1) EP2647974A4 (zh)
JP (1) JP2014509408A (zh)
KR (1) KR20130116899A (zh)
CN (1) CN102737636B (zh)
WO (1) WO2012139401A1 (zh)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9037474B2 (en) * 2008-09-06 2015-05-19 Huawei Technologies Co., Ltd. Method for classifying audio signal into fast signal or slow signal
CA2898572C (en) 2013-01-29 2019-07-02 Martin Dietz Concept for coding mode switching compensation
FR3024581A1 (fr) * 2014-07-29 2016-02-05 Orange Determination d'un budget de codage d'une trame de transition lpd/fd
US10825467B2 (en) * 2017-04-21 2020-11-03 Qualcomm Incorporated Non-harmonic speech detection and bandwidth extension in a multi-source environment
CN113113032A (zh) * 2020-01-10 2021-07-13 华为技术有限公司 一种音频编解码方法和音频编解码设备

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1785984A1 (en) * 2004-08-31 2007-05-16 Matsushita Electric Industrial Co., Ltd. Audio encoding apparatus, audio decoding apparatus, communication apparatus and audio encoding method
CN101276587A (zh) * 2007-03-27 2008-10-01 北京天籁传音数字技术有限公司 声音编码装置及其方法和声音解码装置及其方法
CN101751926A (zh) * 2008-12-10 2010-06-23 华为技术有限公司 信号编码、解码方法及装置、编解码系统
CN101763856A (zh) * 2008-12-23 2010-06-30 华为技术有限公司 信号分类处理方法、分类处理装置及编码系统

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CA2501368C (en) * 2002-10-11 2013-06-25 Nokia Corporation Methods and devices for source controlled variable bit-rate wideband speech coding
EP2139000B1 (en) * 2008-06-25 2011-05-25 Thomson Licensing Method and apparatus for encoding or decoding a speech and/or non-speech audio input signal
US20100114568A1 (en) * 2008-10-24 2010-05-06 Lg Electronics Inc. Apparatus for processing an audio signal and method thereof
FR2947945A1 (fr) * 2009-07-07 2011-01-14 France Telecom Allocation de bits dans un codage/decodage d'amelioration d'un codage/decodage hierarchique de signaux audionumeriques

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1785984A1 (en) * 2004-08-31 2007-05-16 Matsushita Electric Industrial Co., Ltd. Audio encoding apparatus, audio decoding apparatus, communication apparatus and audio encoding method
CN101276587A (zh) * 2007-03-27 2008-10-01 北京天籁传音数字技术有限公司 声音编码装置及其方法和声音解码装置及其方法
CN101751926A (zh) * 2008-12-10 2010-06-23 华为技术有限公司 信号编码、解码方法及装置、编解码系统
CN101763856A (zh) * 2008-12-23 2010-06-30 华为技术有限公司 信号分类处理方法、分类处理装置及编码系统

Also Published As

Publication number Publication date
CN102737636A (zh) 2012-10-17
EP2647974A4 (en) 2014-02-26
EP2647974A1 (en) 2013-10-09
US20130346088A1 (en) 2013-12-26
CN102737636B (zh) 2014-06-04
JP2014509408A (ja) 2014-04-17
KR20130116899A (ko) 2013-10-24

Similar Documents

Publication Publication Date Title
JP5694531B2 (ja) 高調波信号のコーディングのためのシステム、方法、装置、およびコンピュータ可読媒体
JP2023022073A (ja) 信号分類方法および信号分類デバイス、ならびに符号化/復号化方法および符号化/復号化デバイス
CN108831501B (zh) 用于带宽扩展的高频编码/高频解码方法和设备
RU2437171C1 (ru) Системы, способы и устройство для широкополосного кодирования и декодирования активных кадров
US10607621B2 (en) Method for predicting bandwidth extension frequency band signal, and decoding device
AU2017268591A1 (en) Method of quantizing linear predictive coding coefficients, sound encoding method, method of de-quantizing linear predictive coding coefficients, sound decoding method, and recording medium
JP6574820B2 (ja) 高周波帯域信号を予測するための方法、符号化デバイス、および復号デバイス
WO2015043161A1 (zh) 频带扩展的方法及装置
CA2986435A1 (en) High-band signal generation
MX2013004673A (es) Codificación de señales de audio genéricas a baja tasa de bits y a retardo bajo.
CA2986430A1 (en) High-band signal generation
JP6763849B2 (ja) スペクトル符号化方法
WO2014063489A1 (zh) 音频信号的比特分配的方法和装置
KR101736705B1 (ko) 오디오 신호를 위한 비트 할당 방법 및 장치
JP2019514065A (ja) 高位周波数帯域における検出されたピークスペクトル領域を考慮してオーディオ信号を符号化するオーディオ符号器、オーディオ信号を符号化する方法、及びコンピュータプログラム
WO2012139401A1 (zh) 一种音频编码方法及装置
JP7285830B2 (ja) Celpコーデックにおいてサブフレーム間にビット配分を割り振るための方法およびデバイス
JP6584431B2 (ja) 音声情報を用いる改善されたフレーム消失補正
US20130346073A1 (en) Audio encoder/decoder apparatus

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 11863610

Country of ref document: EP

Kind code of ref document: A1

WWE Wipo information: entry into national phase

Ref document number: 2011863610

Country of ref document: EP

ENP Entry into the national phase

Ref document number: 20137018875

Country of ref document: KR

Kind code of ref document: A

ENP Entry into the national phase

Ref document number: 2013552820

Country of ref document: JP

Kind code of ref document: A

NENP Non-entry into the national phase

Ref country code: DE