CN101499279B - Bit distribution method and apparatus with progressively fine spacing parameter - Google Patents

Bit distribution method and apparatus with progressively fine spacing parameter Download PDF

Info

Publication number
CN101499279B
CN101499279B CN2009100609837A CN200910060983A CN101499279B CN 101499279 B CN101499279 B CN 101499279B CN 2009100609837 A CN2009100609837 A CN 2009100609837A CN 200910060983 A CN200910060983 A CN 200910060983A CN 101499279 B CN101499279 B CN 101499279B
Authority
CN
China
Prior art keywords
frequency band
frame
bit allocation
energy
discrete
Prior art date
Legal status (The legal status 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 status listed.)
Expired - Fee Related
Application number
CN2009100609837A
Other languages
Chinese (zh)
Other versions
CN101499279A (en
Inventor
胡瑞敏
陈水仙
陈冰
王恒
陈文琴
曹晟
陈琪
张磊
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Wuhan University WHU
Original Assignee
Wuhan University WHU
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 Wuhan University WHU filed Critical Wuhan University WHU
Priority to CN2009100609837A priority Critical patent/CN101499279B/en
Publication of CN101499279A publication Critical patent/CN101499279A/en
Application granted granted Critical
Publication of CN101499279B publication Critical patent/CN101499279B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

Spatial parameter is spatial information used for expressing the effect that human ears perceive a sound field. The bit allocation of the spatial parameter is one of core technologies of spatial audio coding. The invention discloses a bit allocation method with the spatial parameter fined step by step and the method includes the steps of: first carrying out frame-dividing processing to an input signal; allocating frequency band of each frame signal according to bark band rule after time-frequency transform and selecting bit allocation mode; and then carrying out bit allocation to all parameters of inter-frame, intra-frame and intra-frequency band according to the selected allocation mode, realizing the bit allocation with the spatial parameter fined step by step and designing an application device based on this. The method gives more bit allocation to a human ear part which perceives the most amount of information most sensitively and less bit allocation to a human ear part which perceives insensitively, thus achieving the purpose of effectively improving coding efficiency on condition of ensuring transparent timbre.

Description

The Bit distribution method of progressively fine spacing parameter and device thereof
Technical field
The present invention relates to a kind of Bit distribution method and device thereof of progressively fine spacing parameter, more specifically, relate to the Bit distribution method and the device thereof of progressively fine spacing parameter in the spatial audio coding system.
Background technology
The spatial audio coding technology is a kind of coding method efficiently that channel number grows up with the linear growth of code check in encoding at conventional audio, and it reduces encoder bit rate by the spatial parameter that will mix under stereo to monophony and extraction sign spatial information.Spatial parameter is mainly described the azimuth information and the dimension of signal.The psychologic acoustics result of study shows, the most important foundation of auditory localization is the difference of voice signal between two ears, usually with interaural difference (Interaural Time Difference, level difference ITD) and between ear (InterauralLevel Difference, ILD) two parameters are described the difference of voice signal between two ears; What another described that people's ear receives the voice signal characteristic is the similarity that ears are answered signal, with correlativity between ear (InterauralCoherence IC) represents, key reaction the perception of people's ear to auditory events sound field width.Other some spatial parameters also comprise the range information of definite sound source distance and the elevation angle clue of definite sound source upright position etc.
Spatial information characterizes by spatial parameter, that is to say, comes the spatial information amount of expression signal by the information of metric space parameter.The size of the contained quantity of information of energy energy reaction signal of signal, the energy of spatial parameter has also reacted the spatial information amount size of its expression.(Spatial PerceptualEntropy SPE) also is used for the size of the appreciable spatial information amount of people's ear in the metric space sound field to spacing perception entropy.People's ear exists masking effect to the perception of different frequency bands spatial parameter, and SPE has removed the quantity of information that people's ear can not the perception part, has reflected the lower limit code check near transparent tonequality, is the direction that audio compression research is made great efforts.
The target of audio compression is to represent sound signal with the least possible bit, can guarantee that again the audio signal quality of rebuilding is almost identical with original signal simultaneously.Sensing audio encoding algorithm based on psychoacoustic model is a kind of audio compression encryption algorithm that is most widely used now, and it utilizes the perception incoherentness of signal and statistical redundancy to carry out lossy compression method, thereby reduces the coded data amount that participates in.Bit Allocation in Discrete is a kind of useful quantitative method in the audio compression coding techniques, and it is that the bit number that total amount is limited is distributed according to need to a series of quantifying unit, and makes audio quality the highest by the distortion minimum criteria.
The cardinal rule of Bit Allocation in Discrete is big or change than signal allocation more bits number faster to amplitude in the current audio coding technology, and is less or change the distribution that slow signal then reduces bit number to amplitude, thereby realizes the high efficiency of coding.Because people's ear exists the frequencydependence characteristic of frequency masking effect and spatial parameter, and the Bit distribution method that adopts in the present space audio coding system is not considered the frequency characteristic of spatial parameter and is come spatial parameter is carried out fine quantization, exist the spatial parameter coding redundancy, restricted the application of stereo or multi-channel audio coding under the limited code check.
Summary of the invention
The object of the invention is at the deficiencies in the prior art, proposes the Bit distribution method and the device thereof of progressively fine spacing parameter, effectively to improve code efficiency under the prerequisite that guarantees transparent tonequality.
Bit distribution method technical scheme provided by the invention is for comprising following steps:
Step 1 is carried out processing of branch frame and frequency band division processing to input signal;
Step 2 is carried out the Bit Allocation in Discrete pattern and is chosen, when promptly choosing the interframe Bit Allocation in Discrete, the Bit Allocation in Discrete pattern that adopts respectively when dividing timing and frequency band Nepit to distribute of frame Nepit;
Step 3 is chosen the type of coding of every frame input signal,
If select the variable bit rate coding for use, then the Bit Allocation in Discrete pattern that obtains according to step 2 is carried out the interframe Bit Allocation in Discrete to every frame input signal, then each frequency band in the frame is carried out the frame Nepit and distributes, and obtains each bandwidth assignment result in the frame; If select the cbr (constant bit rate) coding for use, then the Bit Allocation in Discrete pattern that obtains according to step 2 uses the Bit Allocation in Discrete standard under the corresponding modes that each frequency band in the frame is carried out the distribution of frame Nepit, obtains each bandwidth assignment result in the frame;
Step 4 is chosen the concern frequency band according to the Bit Allocation in Discrete pattern that step 2 obtains, and its concrete mode is,
If energy Bit Allocation in Discrete pattern, then energy and the energy threshold with each frequency band in every frame compares, exceed threshold value and then be judged to the concern frequency band, each spatial parameter carries out the distribution of frequency band Nepit by energy Bit Allocation in Discrete pattern in the frequency band to paying close attention to, and exports each spatial parameter bit allocation result code stream; Otherwise then be judged to non-concern frequency band, interior each bandwidth assignment of output frame is code stream as a result;
If spacing perception entropy Bit Allocation in Discrete pattern, then spacing perception entropy and the spacing perception entropy thresholding with each frequency band in every frame compares, exceed threshold value and then be judged to the concern frequency band, each spatial parameter carries out the distribution of frequency band Nepit by spacing perception entropy Bit Allocation in Discrete pattern in the frequency band to paying close attention to, and exports each spatial parameter bit allocation result code stream; Otherwise then be judged to non-concern frequency band, interior each bandwidth assignment of output frame is code stream as a result.
And, in the step 2, choose the Bit Allocation in Discrete pattern automatically according to energy, spacing perception entropy and the fluctuation degree of input signal, promptly adopt energy Bit Allocation in Discrete pattern or spacing perception entropy Bit Allocation in Discrete pattern; Based on energy, estimation Bit Allocation in Discrete weight was carried out Bit Allocation in Discrete when described energy Bit Allocation in Discrete pattern was meant Bit Allocation in Discrete; Based on spacing perception entropy, estimation Bit Allocation in Discrete weight was carried out Bit Allocation in Discrete when described spacing perception entropy Bit Allocation in Discrete pattern was meant Bit Allocation in Discrete;
Described fluctuation degree comprises energy hunting degree and the moving degree of entropy wave; The energy of described input signal obtains by the energy of asking in the frequency band each frequency band in each spatial parameter, the frame and every frame successively, obtains in the frequency band energy hunting degree of each frequency band in each spatial parameter, the frame and every frame respectively according to the energy of each frequency band and every frame in each spatial parameter, the frame in the frequency band; The spacing perception entropy of described input signal obtains by the spacing perception entropy of asking in the frequency band each frequency band in each spatial parameter, the frame and every frame successively, obtains in the frequency band the moving degree of entropy wave of each frequency band in each spatial parameter, the frame and every frame respectively according to the spacing perception entropy of each frequency band and every frame in each spatial parameter, the frame in the frequency band;
It is as follows specifically to choose implementation,
If the energy hunting degree of every frame greater than the moving degree of entropy wave, when the interframe Bit Allocation in Discrete, adopts energy Bit Allocation in Discrete pattern; If the energy hunting degree of every frame adopts spacing perception entropy Bit Allocation in Discrete pattern smaller or equal to the moving degree of entropy wave;
If the energy hunting degree of each frequency band divides timing greater than the moving degree of entropy wave at the frame Nepit in the frame, adopt energy Bit Allocation in Discrete pattern; If the energy hunting degree of every frame adopts spacing perception entropy Bit Allocation in Discrete pattern smaller or equal to the moving degree of entropy wave;
If the energy hunting degree of each spatial parameter divides timing greater than the moving degree of entropy wave at the frequency band Nepit in the frequency band, adopt energy Bit Allocation in Discrete pattern; If the energy hunting degree of every frame adopts spacing perception entropy Bit Allocation in Discrete pattern smaller or equal to the moving degree of entropy wave.
And the energy acquisition mode of each spatial parameter is in the described frequency band, asks for the value of spatial parameter earlier, calculates the energy that each spatial parameter is comprised in the frequency band then; Be that its computing formula is:
e p=δ p 2 (1)
E wherein pBe the energy that each spatial parameter among the frequency band b comprises, δ pThe representation space parameter is in the value of frequency band b;
The energy of each frequency band is meant the energy that each frequency band comprises in the described frame, acquisition mode be ask all spatial parameters in the frequency band energy and; Be that its computing formula is:
e b=∑e p (2)
E wherein pThe energy that comprises for each spatial parameter among the frequency band b; P gets all spatial parameters;
The energy of described every frame be meant all frequency bands in every frame energy and; Be that its computing formula is:
e f = Σ b = 1 m e b - - - ( 3 )
E wherein bBe the energy that frequency band b comprises, f get 1,2 ..., n}, n are frame number, the frequency band number of m for dividing.
And, when spending, the energy hunting of asking for each frequency band in each spatial parameter in the frequency band, the frame and every frame adopts following formula
σ e = E ( x 2 ) - E 2 ( x ) - - - ( 7 )
Wherein x gets the energy of each spatial parameter in the frequency band, interior each frequency band of frame and every frame respectively.
And when (a) the Bit Allocation in Discrete pattern that adopts during selected interframe Bit Allocation in Discrete in the step 2 was energy Bit Allocation in Discrete pattern, the specific implementation of every frame input signal being carried out the interframe Bit Allocation in Discrete was,
At first, contrast the energy e of every frame signal f, calculate the shared weight w of every frame energy Ef, computing formula:
w ef = e f / Σ f = 1 n e f - - - ( 8 )
Then, the bit number B that should distribute according to the every frame of weight calculation Ef, carry out the interframe Bit Allocation in Discrete, computing formula:
B ef=w ef×B (9)
Wherein B is total bit number of input signal, f get 1,2 ..., n}, n are frame number;
When (b) the Bit Allocation in Discrete pattern that selected frame Nepit divides timing to adopt in the step 2 is energy Bit Allocation in Discrete pattern, each frequency band in the frame carried out the specific implementation that the frame Nepit distributes is,
At first, the energy e of each band signal in the contrast frame b, calculate the shared weight w of each frequency band energy Eb, computing formula:
w eb = e b / Σ b = 1 m e b - - - ( 10 )
Then, the bit number B that should distribute according to each frequency band in the weight calculation frame Eb, carry out the frame Nepit and distribute computing formula:
B eb=w eb×B ef (11)
B wherein EfBe the bit number of frequency band place frame, the frequency band number of m for dividing, f get 1,2 ..., n}, n are frame number;
When (c) the Bit Allocation in Discrete pattern that selected frequency band Nepit divides timing to adopt in the step 2 is energy Bit Allocation in Discrete pattern, carries out the specific implementation that the frequency band Nepit distributes and be paying close attention to each spatial parameter in the frequency band,
At first, the energy e of each spatial parameter signal in the contrast frequency band p, calculate the shared weight w of each spatial parameter energy Ep, computing formula:
w ep=e p/∑e p (12)
Then, the bit number B that distributes according to each spatial parameter of weight calculation Ep, carry out the frequency band Nepit and distribute computing formula:
B ep=w ep×B eb (13)
B wherein EbBe the bit number of frequency band b, p gets all spatial parameters.
And, the spacing perception entropy s of each spatial parameter in the described frequency band pAcquisition mode is, calculates each spatial parameter value earlier, the spatial information amount that obtains each spatial parameter at last and comprised; Be that computing formula is:
s p = 1 N α log δ p Δξ ( b ) - - - ( 4 )
S wherein pBe the spatial perception entropy of spatial parameter, δ pThe representation space parameter is in the value of frequency band b, and Δ ξ (b) representation space parameter is in the finite resolving power of frequency band b, and α reflects the amplitude compression of sense of hearing perception, and N is the frame length of time-frequency conversion, and log is the end with any natural number, and p gets all spatial parameters;
The spacing perception entropy s of each frequency band in the described frame b, be meant the spacing perception entropy sum of all spatial parameters in each frequency band; Be that its computing formula is:
s b=∑s p (5)
S wherein pBe the spatial perception entropy of spatial parameter, can calculate by formula (4); P gets all spatial parameters;
The spacing perception entropy s of described every frame f, be meant all frequency band SPE sums that a frame comprises; Be that its computing formula is:
s f = Σ b = 1 m s b - - - ( 6 )
S wherein bBe the spacing perception entropy of frequency band b, can calculate by formula (5); The frequency band number of m for dividing, f get 1,2 ..., n}, n are frame number.
And the entropy wave of asking for each spatial parameter in the frequency band, interior each frequency band of frame and every frame moves and adopts following formula when spending
σ s = E ( x 2 ) - E 2 ( x ) - - - ( 7 )
Wherein x gets the spacing perception entropy of each spatial parameter in the frequency band, interior each frequency band of frame and every frame, i.e. s respectively p, s b, s f
And when (A) the Bit Allocation in Discrete pattern that adopts during selected interframe Bit Allocation in Discrete in the step 2 was spacing perception entropy Bit Allocation in Discrete pattern, the specific implementation of every frame input signal being carried out the interframe Bit Allocation in Discrete was,
At first, contrast the spacing perception entropy s of every frame signal f, calculate the shared weight w of every frame spacing perception entropy Sf, computing formula:
w sf = s f / Σ f = 1 n s f - - - ( 14 )
Then, the bit number B that should distribute according to the every frame of weight calculation Sf, carry out the interframe Bit Allocation in Discrete, computing formula:
B sf=w sf×B (15)
Wherein B represents total bit number of input signal, f get 1,2 ..., n}, n are frame number;
When (B) the Bit Allocation in Discrete pattern that selected frame Nepit divides timing to adopt in the step 2 is spacing perception entropy Bit Allocation in Discrete pattern, each frequency band in the frame carried out the specific implementation that the frame Nepit distributes is,
At first, the spacing perception entropy s of each frequency band in the contrast frame b, calculate the shared weight w of each frequency band energy in the frame Sb, computing formula:
w sb = s b / Σ b = 1 m s b - - - ( 16 )
Then, the bit number B that should distribute according to each frequency band in the weight calculation frame Sb, carry out the frame Nepit and distribute computing formula:
B sb=w sb×B sf (17)
Wherein m is the frequency band number of division, B SfBit number for frequency band place frame;
When (C) the Bit Allocation in Discrete pattern that selected frequency band Nepit divides timing to adopt in the step 2 is spacing perception entropy Bit Allocation in Discrete pattern, carries out the specific implementation that the frequency band Nepit distributes and be paying close attention to each spatial parameter in the frequency band,
At first, the s of spatial parameter in the contrast frequency band p, the shared weight w of spacing perception entropy of spatial parameter in the calculating frequency band Sp, computing formula:
w sp=s p/∑s p (18)
Then, the bit number B that distributes according to each spatial parameter in the weight calculation frequency band Sp, carry out the frequency band Nepit and distribute computing formula:
B sp=w sp×B sb (19)
B wherein SbBe the bit number of frequency band b, p gets all spatial parameters.
And, default energy weight threshold value
Figure G2009100609837D00082
With spacing perception entropy weight threshold value;
In step 4, if the Bit Allocation in Discrete pattern that selected frequency band Nepit divides timing to adopt in the step 2 is an energy Bit Allocation in Discrete pattern, by comparing the energy weight w of each frequency band EbWith energy weight threshold value
Figure G2009100609837D00083
Magnitude relationship, realize the energy and the energy threshold of each frequency band in every frame are compared; If the Bit Allocation in Discrete pattern that selected frequency band Nepit divides timing to adopt in the step 2 is a spacing perception entropy Bit Allocation in Discrete pattern, by comparing the spacing perception entropy weight w of each frequency band SbWith the magnitude relationship of pre-set space perceptual entropy weight threshold value, realize the spacing perception entropy and the spacing perception entropy thresholding of each frequency band in every frame are compared.
The present invention also provides the device of implementing above-mentioned Bit distribution method, comprises with the lower part:
Pretreatment module is used for input signal is carried out processing of branch frame and frequency band division processing;
Bit rate mode is selected module, is used to choose the type of coding of every frame input signal;
Interframe Bit Allocation in Discrete module is used for every frame input signal is carried out Bit Allocation in Discrete;
Frame Nepit distribution module is used for each frequency band in the frame is carried out Bit Allocation in Discrete;
Frequency band Nepit distribution module is used for carrying out Bit Allocation in Discrete to paying close attention to each spatial parameter of frequency band;
Pay close attention to frequency band and choose module, be used for choosing the concern frequency band of every frame signal;
The Bit Allocation in Discrete pattern is chosen module, is used to choose different Bit Allocation in Discrete patterns;
The code stream forming module is used for exporting each bandwidth assignment result in each spatial parameter bit allocation result or the frame with the code stream form;
Wherein, the Bit Allocation in Discrete pattern is chosen module and is linked to each other with pretreatment module, interframe Bit Allocation in Discrete module and frequency band Nepit distribution module respectively; Bit rate mode selection module is chosen module with interframe Bit Allocation in Discrete module, frame Nepit distribution module and Bit Allocation in Discrete pattern respectively and is linked to each other; Interframe Bit Allocation in Discrete module links to each other with frame Nepit distribution module; The concern frequency band is chosen module and is linked to each other with the code stream forming module with frame Nepit distribution module, frequency band Nepit distribution module respectively, and frequency band Nepit distribution module links to each other with the code stream forming module respectively.
The present invention proposes the Bit distribution method and the related device of progressively fine spacing parameter, distributes by input signal being carried out interframe Bit Allocation in Discrete, the distribution of frame Nepit and frequency band Nepit, reaches meticulous step by step.By technical scheme provided by the present invention, can effectively carry out fine quantization to spatial parameter, under limited code check, realize the high-quality coding.
Description of drawings
Fig. 1 is a principle of the invention synoptic diagram;
Fig. 2 is each frequency band and interior each spatial parameter triadic relation synoptic diagram of frequency band in interframe, the frame;
Fig. 3 chooses modular structure figure for the Bit Allocation in Discrete pattern of the embodiment of the invention;
Fig. 4 is an interframe Bit Allocation in Discrete schematic diagram;
Fig. 5 is frame Nepit distribution principle figure;
Fig. 6 is frequency band Nepit distribution principle figure;
Fig. 7 is the overall applicability process flow diagram of the embodiment of the invention
Fig. 8 is an apparatus structure synoptic diagram of the present invention.
Embodiment
The present invention mainly adopts interframe to spatial parameter, meticulous step by step distribution method in the frame and in the frequency band, more bits is distributed to the sensitive portions of people's ear perception, and give the insensitive part of people's ear perception, thereby under the prerequisite that guarantees transparent tonequality, effectively improve code efficiency with less Bit Allocation in Discrete.Accompanying drawing 2 is depicted as frame, each spatial parameter triadic relation synoptic diagram in each frequency band and the frequency band in the frame.As seen from the figure, input signal is divided into the n frame, and every frame comprises m frequency band, and each frequency band comprises spectral line ILD, ICD, IC of spatial parameter etc.The three is a relation that comprises step by step.
Bit distribution method provided by the invention can adopt computer software technology to realize, also can utilize modular design device of the present invention to realize.Device provided by the invention comprises that pretreatment module, bit rate mode selection module, interframe Bit Allocation in Discrete module, frame Nepit distribution module, frequency band Nepit distribution module, concern frequency band are chosen module, the Bit Allocation in Discrete pattern is chosen module and code stream forming module as shown in Figure 8; The Bit Allocation in Discrete pattern is chosen module and is linked to each other with pretreatment module, interframe Bit Allocation in Discrete module and frequency band Nepit distribution module respectively; Bit rate mode selection module is chosen module with interframe Bit Allocation in Discrete module, frame Nepit distribution module and Bit Allocation in Discrete pattern respectively and is linked to each other; Interframe Bit Allocation in Discrete module links to each other with frame Nepit distribution module; The concern frequency band is chosen module and is linked to each other with the code stream forming module with frame Nepit distribution module, frequency band Nepit distribution module respectively, and frequency band Nepit distribution module links to each other with the code stream forming module respectively.Can be in conjunction with the Bit distribution method that this device is realized referring to accompanying drawing 1, Bit Allocation in Discrete scheme of the present invention is meticulous step by step process, is respectively the interframe Bit Allocation in Discrete, the frame Nepit distributes and the frequency band Nepit distributes.Wherein to choose module be again to instruct the core of Bit Allocation in Discrete to the Bit Allocation in Discrete pattern, closely links to each other with three big distribution module.
Step 1 is carried out processing of branch frame and frequency band division processing to input signal;
This step can be realized by pretreatment module.During concrete enforcement, branch frame processing unit and frequency band division unit can be set in pretreatment module, by minute frame processing unit input signal be carried out the branch frame and handle, every frame signal be carried out time-frequency conversion and frequency band division processing by the frequency band division unit.
Step 2 is carried out the Bit Allocation in Discrete pattern and is chosen, when promptly choosing the interframe Bit Allocation in Discrete, the Bit Allocation in Discrete pattern that adopts respectively when dividing timing and frequency band Nepit to distribute of frame Nepit;
The invention provides further technical scheme, can choose the Bit Allocation in Discrete pattern automatically according to energy, spacing perception entropy and the fluctuation degree of input signal, alternative is energy Bit Allocation in Discrete pattern or spacing perception entropy Bit Allocation in Discrete pattern.Based on energy, estimation Bit Allocation in Discrete weight was carried out Bit Allocation in Discrete when described energy Bit Allocation in Discrete pattern was meant Bit Allocation in Discrete; Based on spacing perception entropy, estimation Bit Allocation in Discrete weight was carried out Bit Allocation in Discrete when described spacing perception entropy Bit Allocation in Discrete pattern was meant Bit Allocation in Discrete.Except Bit Allocation in Discrete pattern, also can provide other Bit Allocation in Discrete pattern selective when specifically implementing, for example based on the Bit Allocation in Discrete pattern of spatial parameter amplitude based on energy and spacing perception entropy.
Described fluctuation degree comprises energy hunting degree and the moving degree of entropy wave; The energy of described input signal obtains by the energy of asking in the frequency band each frequency band in each spatial parameter, the frame and every frame successively, obtains in the frequency band energy hunting degree of each frequency band in each spatial parameter, the frame and every frame respectively according to the energy of each frequency band and every frame in each spatial parameter, the frame in the frequency band; The spacing perception entropy of described input signal obtains by the spacing perception entropy of asking in the frequency band each frequency band in each spatial parameter, the frame and every frame successively, obtains in the frequency band the moving degree of entropy wave of each frequency band in each spatial parameter, the frame and every frame respectively according to the spacing perception entropy of each frequency band and every frame in each spatial parameter, the frame in the frequency band;
It is as follows specifically to choose implementation,
If the energy hunting degree of every frame greater than the moving degree of entropy wave, when the interframe Bit Allocation in Discrete, adopts energy Bit Allocation in Discrete pattern; If the energy hunting degree of every frame adopts spacing perception entropy Bit Allocation in Discrete pattern smaller or equal to the moving degree of entropy wave;
If the energy hunting degree of each frequency band divides timing greater than the moving degree of entropy wave at the frame Nepit in the frame, adopt energy Bit Allocation in Discrete pattern; If the energy hunting degree of every frame adopts spacing perception entropy Bit Allocation in Discrete pattern smaller or equal to the moving degree of entropy wave;
If the energy hunting degree of each spatial parameter divides timing greater than the moving degree of entropy wave at the frequency band Nepit in the frequency band, adopt energy Bit Allocation in Discrete pattern; If the energy hunting degree of every frame adopts spacing perception entropy Bit Allocation in Discrete pattern smaller or equal to the moving degree of entropy wave.
This step can be chosen module by the Bit Allocation in Discrete pattern and realize.During concrete enforcement, the Bit Allocation in Discrete pattern is chosen module can the signalization energy calculation unit, spacing perception entropy computing unit, fluctuation degree computing unit and allocation model are chosen the unit and chosen different Bit Allocation in Discrete patterns, and the Bit Allocation in Discrete pattern of choosing is exported to interframe Bit Allocation in Discrete module, frame Nepit distribution module and frequency band Nepit distribution module.Shown in accompanying drawing 3, by the energy of signal energy computation unit signal calculated, by the spacing perception entropy of spacing perception entropy computing unit signal calculated.The result that will obtain is input to fluctuation degree computing unit then, by the energy hunting degree and the moving degree of entropy wave of energy hunting degree computing unit in the fluctuation degree computing unit and the moving degree of entropy wave computing unit difference signal calculated; Choose the unit by allocation model at last, the moving degree of contrast energy hunting degree and entropy wave carries out allocation model and chooses.If the energy hunting degree is then chosen the Bit Allocation in Discrete pattern based on energy greater than the moving degree of entropy wave; When being less than or equal to, then choose Bit Allocation in Discrete pattern based on spacing perception entropy.
For the ease of implementing, the present invention also provide input signal energy, spacing perception entropy and fluctuation degree concrete acquisition mode for your guidance:
The energy acquisition mode of each spatial parameter is in the described frequency band, asks for the value of spatial parameter earlier, calculates the energy that each spatial parameter is comprised in the frequency band then; Be that its computing formula is:
e p=δ p 2 (1)
E wherein pBe the energy that each spatial parameter among the frequency band b comprises, δ pThe representation space parameter is in the value of frequency band b;
The energy of each frequency band is meant the energy that each frequency band comprises in the described frame, acquisition mode be ask all spatial parameters in the frequency band energy and; Be that its computing formula is:
e b=∑e p (2)
E wherein pThe energy that comprises for each spatial parameter among the frequency band b; P gets all spatial parameters;
The energy of described every frame be meant all frequency bands in every frame energy and; Be that its computing formula is:
e f = Σ b = 1 m e b - - - ( 3 )
E wherein bBe the energy that frequency band b comprises, f get 1,2 ..., n}, n are frame number, the frequency band number of m for dividing.
The spacing perception entropy s of each spatial parameter in the described frequency band pAcquisition mode is, calculates each spatial parameter value earlier, the spatial information amount that obtains each spatial parameter at last and comprised; Be that computing formula is:
s p = 1 N α log δ p Δξ ( b ) - - - ( 4 )
S wherein pBe the spatial perception entropy of spatial parameter, δ pThe representation space parameter is in the value of frequency band b, and Δ ξ (b) representation space parameter is in the finite resolving power of frequency band b, and α reflects the amplitude compression of sense of hearing perception, and N is the frame length of time-frequency conversion, and log is the end with any natural number, and p gets all spatial parameters;
The spacing perception entropy s of each frequency band in the described frame b, be meant the spacing perception entropy sum of all spatial parameters in each frequency band; Be that its computing formula is:
s b=∑s p (5)
S wherein pBe the spatial perception entropy of spatial parameter, can calculate by formula (4); P gets all spatial parameters;
The spacing perception entropy s of described every frame f, be meant all frequency band SPE sums that a frame comprises; Be that its computing formula is:
s f = Σ b = 1 m s b - - - ( 6 )
S wherein bBe the spacing perception entropy of frequency band b, can calculate by formula (5); The frequency band number of m for dividing, f get 1,2 ..., n}, n are frame number.
The energy hunting degree of asking for signal is similar with the moving degree mode of entropy wave:
When spending, the energy hunting of asking for each frequency band in each spatial parameter in the frequency band, the frame and every frame adopts following formula
σ e = E ( x 2 ) - E 2 ( x ) - - - ( 7 )
Wherein x gets the energy of each frequency band in each spatial parameter in the frequency band, the frame and every frame respectively, calculate before just e p, e b, e f
The entropy wave of asking for each spatial parameter in the frequency band, interior each frequency band of frame and every frame moves and adopts following formula when spending
σ s = E ( x 2 ) - E 2 ( x ) - - - ( 7 )
Wherein x gets the spacing perception entropy of each spatial parameter in the frequency band, interior each frequency band of frame and every frame, i.e. s respectively p, s b, s f
Step 3 is chosen the type of coding of every frame input signal,
If select the variable bit rate coding for use, then the Bit Allocation in Discrete pattern that obtains according to step 2 is carried out the interframe Bit Allocation in Discrete to every frame input signal, then each frequency band in the frame is carried out the frame Nepit and distributes, and obtains each bandwidth assignment result in the frame; If select the cbr (constant bit rate) coding for use, then the Bit Allocation in Discrete pattern that obtains according to step 2 uses the Bit Allocation in Discrete standard under the corresponding modes that each frequency band in the frame is carried out the distribution of frame Nepit, obtains each bandwidth assignment result in the frame;
That is to say,, need carry out interframe Bit Allocation in Discrete and frame Nepit and distribute if select the variable bit rate coding for use; If select the cbr (constant bit rate) coding for use, only need carry out the frame Nepit and distribute.Finally all can obtain each bandwidth assignment result in the frame.Choosing the type of coding of every frame input signal can select module to realize that interframe Bit Allocation in Discrete module is used for every frame input signal is carried out Bit Allocation in Discrete by bit rate mode, and frame Nepit distribution module is used for each frequency band in the frame is carried out Bit Allocation in Discrete; Therefore bit rate mode is selected module to choose module with interframe Bit Allocation in Discrete module, frame Nepit distribution module and Bit Allocation in Discrete pattern respectively to link to each other.As shown in Figure 4, at first input signal is carried out pre-service, choose module by the Bit Allocation in Discrete pattern then and choose the Bit Allocation in Discrete pattern, choose coding mode by the code rate selection module,, carry out the interframe Bit Allocation in Discrete if adopt the variable bit rate coding, at the Bit Allocation in Discrete pattern that is selected, use corresponding Bit Allocation in Discrete standard, carry out weight calculation, carry out the interframe Bit Allocation in Discrete according to weight.As shown in Figure 5, pretreated signal is sent into the Bit Allocation in Discrete pattern choose module, determine the Bit Allocation in Discrete pattern, be based on energy and also be based on spacing perception entropy.Select module to choose coding mode by bit rate mode then,, then enter the interframe Bit Allocation in Discrete if adopt the variable bit rate coding.If adopt the cbr (constant bit rate) coding, just enter frame Nepit distribution module, according to the Bit Allocation in Discrete pattern that is selected, use corresponding Bit Allocation in Discrete standard, carry out weight calculation, carry out the frame Nepit according to the bit allocation result of weight and every frame and distribute.The distribution of frame Nepit is the equal of the further refinement to the interframe Bit Allocation in Discrete.
Step 4 is chosen the concern frequency band according to the Bit Allocation in Discrete pattern that step 2 obtains, and its concrete mode is,
If energy Bit Allocation in Discrete pattern, then energy and the energy threshold with each frequency band in every frame compares, exceed threshold value and then be judged to the concern frequency band, each spatial parameter carries out the distribution of frequency band Nepit by energy Bit Allocation in Discrete pattern in the frequency band to paying close attention to, and exports each spatial parameter bit allocation result code stream; Otherwise then be judged to non-concern frequency band, interior each bandwidth assignment of output frame is code stream as a result;
If spacing perception entropy Bit Allocation in Discrete pattern, then spacing perception entropy and the spacing perception entropy thresholding with each frequency band in every frame compares, exceed threshold value and then be judged to the concern frequency band, each spatial parameter carries out the distribution of frequency band Nepit by spacing perception entropy Bit Allocation in Discrete pattern in the frequency band to paying close attention to, and exports each spatial parameter bit allocation result code stream; Otherwise then be judged to non-concern frequency band, interior each bandwidth assignment of output frame is code stream as a result.
The concern frequency band of choosing in every frame signal can be chosen the module realization by paying close attention to frequency band, and frequency band Nepit distribution module is used for carrying out Bit Allocation in Discrete to paying close attention to each spatial parameter of frequency band.At last, if chosen the concern frequency band and generated each spatial parameter bit allocation result, the code stream forming module is exported each spatial parameter bit allocation result with the code stream form, i.e. each spatial parameter bit allocation result code stream; Otherwise directly with each bandwidth assignment result in the code stream form output step 3 gained frame, i.e. each bandwidth assignment code stream as a result in the frame.Therefore, paying close attention to frequency band chooses module and links to each other with the code stream forming module with frame Nepit distribution module, frequency band Nepit distribution module; Frequency band Nepit distribution module links to each other with the code stream forming module.Shown in accompanying drawing 6, the input signal of frequency band Nepit distribution module is the output signal of accompanying drawing 5.Frame Nepit distribution result is sent into concern frequency band judging module.At the Bit Allocation in Discrete pattern that is selected, set corresponding threshold value by paying close attention to the frequency band judging module, the Bit Allocation in Discrete weights and the setting value of each frequency band in the frame compared, judge whether to exceed limited range.If do not exceed limit value, then be judged as non-concern frequency band, enter the code stream forming module.Otherwise then be judged as the concern frequency band, enter frequency band Nepit distribution module.According to the Bit Allocation in Discrete pattern that is selected, use corresponding Bit Allocation in Discrete standard then, carry out weight calculation, carry out the frequency band Nepit according to weight and distribute.This grade distribution is further refinement.
Accompanying drawing 7 is depicted as the overall applicability process flow diagram of the Bit distribution method of progressively fine spacing parameter, and interframe Bit Allocation in Discrete, frame Nepit are distributed for it and the frequency band Nepit distributes combination.In the spatial audio coding system applies, realize the meticulous step by step process of Bit Allocation in Discrete.
The specific implementation that interframe Bit Allocation in Discrete in the step 3 and 4, frame Nepit distribution module, frequency band Nepit distribute all is to decide according to setting the Bit Allocation in Discrete pattern in the step 2, the present invention provides the implementation under two kinds of patterns respectively, according to circumstances calls during enforcement:
When (a) the Bit Allocation in Discrete pattern that adopts during selected interframe Bit Allocation in Discrete in the step 2 was energy Bit Allocation in Discrete pattern, the specific implementation of every frame input signal being carried out the interframe Bit Allocation in Discrete was,
At first, contrast the energy e of every frame signal f, calculate the shared weight w of every frame energy Ef, computing formula:
w ef = e f / Σ f = 1 n e f - - - ( 8 )
Then, the bit number B that should distribute according to the every frame of weight calculation Ef, carry out the interframe Bit Allocation in Discrete, computing formula:
B ef=w ef×B (9)
Wherein B is total bit number of input signal, f get 1,2 ..., n}, n are frame number;
When (b) the Bit Allocation in Discrete pattern that selected frame Nepit divides timing to adopt in the step 2 is energy Bit Allocation in Discrete pattern, each frequency band in the frame carried out the specific implementation that the frame Nepit distributes is,
At first, the energy e of each band signal in the contrast frame b, calculate the shared weight w of each frequency band energy Eb, computing formula:
w eb = e b / Σ b = 1 m e b - - - ( 10 )
Then, the bit number B that should distribute according to each frequency band in the weight calculation frame Eb, carry out the frame Nepit and distribute computing formula:
B eb=w eb×B ef (11)
B wherein EfBe the bit number of frequency band place frame, the frequency band number of m for dividing, f get 1,2 ..., n}, n are frame number;
When (c) the Bit Allocation in Discrete pattern that selected frequency band Nepit divides timing to adopt in the step 2 is energy Bit Allocation in Discrete pattern, carries out the specific implementation that the frequency band Nepit distributes and be paying close attention to each spatial parameter in the frequency band,
At first, the energy e of each spatial parameter signal in the contrast frequency band p, calculate the shared weight w of each spatial parameter energy Ep, computing formula:
w ep=e p/∑e p (12)
Then, the bit number B that distributes according to each spatial parameter of weight calculation Ep, carry out the frequency band Nepit and distribute computing formula:
B ep=w ep×B eb (13)
B wherein EbBe the bit number of frequency band b, p gets all spatial parameters.
When (A) the Bit Allocation in Discrete pattern that adopts during selected interframe Bit Allocation in Discrete in the step 2 was spacing perception entropy Bit Allocation in Discrete pattern, the specific implementation of every frame input signal being carried out the interframe Bit Allocation in Discrete was,
At first, contrast the spacing perception entropy s of every frame signal f, calculate the shared weight w of every frame spacing perception entropy Sf, computing formula:
w sf = s f / Σ f = 1 n s f - - - ( 14 )
Then, the bit number B that should distribute according to the every frame of weight calculation Sf, carry out the interframe Bit Allocation in Discrete, computing formula:
B sf=w sf×B (15)
Wherein B represents total bit number of input signal, f get 1,2 ..., n}, n are frame number;
When (B) the Bit Allocation in Discrete pattern that selected frame Nepit divides timing to adopt in the step 2 is spacing perception entropy Bit Allocation in Discrete pattern, each frequency band in the frame carried out the specific implementation that the frame Nepit distributes is,
At first, the spacing perception entropy s of each frequency band in the contrast frame b, calculate the shared weight w of each frequency band energy in the frame Sb, computing formula:
w sb = s b / Σ b = 1 m s b - - - ( 16 )
Then, the bit number B that should distribute according to each frequency band in the weight calculation frame Sb, carry out the frame Nepit and distribute computing formula:
B sb=w sb×B sf (17)
Wherein m is the frequency band number of division, B SfBit number for frequency band place frame;
When (C) the Bit Allocation in Discrete pattern that selected frequency band Nepit divides timing to adopt in the step 2 is spacing perception entropy Bit Allocation in Discrete pattern, carries out the specific implementation that the frequency band Nepit distributes and be paying close attention to each spatial parameter in the frequency band,
At first, the s of spatial parameter in the contrast frequency band p, the shared weight w of spacing perception entropy of spatial parameter in the calculating frequency band Sp, computing formula:
w sp=s p/∑s p (18)
Then, the bit number B that distributes according to each spatial parameter in the weight calculation frequency band Sp, carry out the frequency band Nepit and distribute computing formula:
B sp=w sp×B sb (19)
B wherein SbBe the bit number of frequency band b, p gets all spatial parameters.
An embodiment below being provided, some processes that are repeated to use as can invoked step, be more met the software design custom, is a kind of preferred version of the present invention when specifically implementing, also should be in protection domain of the presently claimed invention.This scheme may further comprise the steps:
Step 1, by pretreatment module input signal is carried out that the branch frame is handled and frequency band division is handled.
The embodiment of this step is:
By minute frame processing unit input signal is carried out the branch frame and handle, be embodied as the sound signal of input was carried out a minute frame processing at 1024 o'clock with frame length.
By the frequency band division unit input signal is carried out frequency band division and handle, be embodied as input signal is carried out time-frequency conversion, according to the division rule of Bark band, each frame is divided into 25 frequency bands through the signal behind the time-frequency conversion then.
Step 2, choose module by the Bit Allocation in Discrete pattern and choose different Bit Allocation in Discrete patterns.
The embodiment of this step is:
As shown in Figure 3, the Bit Allocation in Discrete pattern is chosen module and comprised four elementary cells: signal energy computation unit, spacing perception entropy computing unit, fluctuation degree computing unit and allocation model are chosen the unit.
1, by the signal energy computation unit calculate in the frequency band successively, in the frame and the energy of every frame.Concrete computation process is as follows:
(1), calculates each spatial parameter ITD, ILD, IC value respectively at frequency band b.Concrete computing formula is as follows:
δ t = | Re { Σ k = k b k b + 1 - 1 X l ( k ) X r * ( k ) } | Σ k = k b k b + 1 - 1 | X l ( k ) | 2 Σ k = k b k b + 1 - 1 | X r ( k ) | 2 (formula 1)
δ l = 20 log 10 Σ k = k b k b + 1 - 1 | X l ( k ) | 2 Σ k = k b k b + 1 - 1 | X r ( k ) | 2 (formula 2)
δ c = 1 k b + 1 - k b Σ k = k b k b + 1 - 1 ( arg X l ( k + 1 ) - arg X l ( k ) ) (formula 3)
- 1 k b + 1 - k b Σ k = k b k b + 1 - 1 ( arg X r ( k + 1 ) - arg X r ( k ) )
δ wherein t, δ l, δ cRepresent ITD, ILD, IC value respectively at frequency band b.k bAnd k B+1Be respectively the initial FFT spectral line label of frequency band b and b+1, X l(k) and X r(k) represent left and right acoustic channels k bar FFT spectral line, X respectively r *(k) be X r(k) conjugation, Re is for getting real, and arg is the operation of getting phase angle.Wherein b get 1,2 ..., 25}.
(2), calculate the energy e that ITD, ILD, IC comprised p, p gets { t, l, c}.Concrete computing formula is as follows:
e tt 2(formula 4)
e ll 2(formula 5)
e cc 2(formula 6)
E wherein t, e l, e cBe respectively the energy that space parameter I TD, ILD, IC are comprised among the frequency band b.δ t, δ l, δ cRepresent ITD, ILD, IC value respectively at frequency band b, can be by (formula 1), (formula 2), (formula 3) calculates.
(3), calculate the energy e that each frequency band comprises in the frame bConcrete computing formula is as follows:
e b=e t+ e l+ e c(formula 7)
E wherein t, e l, e cBe respectively the energy that space parameter I TD, ILD, IC are comprised among the frequency band b, can be by (formula 4), (formula 5), (formula 6) calculate, b get 1,2 ..., 25}.
(4), the energy e that comprises of the every frame of signal calculated f, concrete computing formula is as follows:
e f = Σ b = 1 25 e b (formula 8)
E wherein bBe the energy that frequency band b comprises, b get 1,2 ..., and 25}, f get 1,2 ..., n}, n are frame number.
2, calculate the spacing perception entropy s of each spatial parameter in the frequency band successively by the spacing perception entropy computing unit p, the spacing perception entropy s of each frequency band in the frame b, every frame spacing perception entropy s fConcrete computation process is as follows:
(1), calculates the spacing perception entropy s of each spatial parameter p, p gets { t, l, c}.Computing formula is as follows:
Figure G2009100609837D00212
(formula 9)
Figure G2009100609837D00221
(formula 10)
Figure G2009100609837D00222
(formula 11)
S wherein t, s l, s cBe respectively the spatial perception entropy of ITD, ILD, IC.δ t, δ l, δ cRepresent ITD, ILD, IC value respectively at frequency band b, can be by (formula 1), (formula 2), (formula 3) calculates.Δ τ (b), Δ λ (b), Δ η (b) are respectively ITD, ILD, the IC JND at frequency band b, wherein b get 1,2 ..., 25}.The amplitude compression of α reflection sense of hearing perception generally gets 0.6.N is the frame length of FFT conversion.Log can any natural number be the end.Usually acquiescence is the end with 2.
Figure G2009100609837D00223
For under round operation.
(2), calculate the spacing perception entropy s of frequency band b bComputing formula is as follows:
s b=s t+ s l+ s c(formula 12)
S wherein t, s l, s cBe respectively the spatial perception entropy of ITD, ILD, IC, can be respectively by formula 9, formula 10, formula 11 calculates.B get 1,2 ..., 25}.
(3), calculate the spacing perception entropy s of every frame fConcrete computing formula is as follows:
s f = Σ b = 1 25 s b (formula 13)
S wherein bBe the spacing perception entropy of frequency band b, b get 1,2 ..., and 25}, f get 1,2 ..., n}, n are frame number.
3,, calculate in the frequency band respectively, the energy hunting degree and the moving degree of entropy wave of each frequency band and every frame in the frame by fluctuation degree computing unit.Concrete computing formula is as follows:
σ = E ( x 2 ) - E 2 ( x ) (formula 14)
By the Bit Allocation in Discrete pattern that step 2 obtains, calculate corresponding fluctuation degree according to corresponding modes.
If calculating energy fluctuation degree, then x gets e respectively p, e b, e fObtain in the frequency band, the energy hunting degree of each frequency band and every frame in the frame, use σ respectively Ep, σ Eb, σ EfRepresent.Wherein p get t, l, c}, b get 1,2 ..., 25}, f get 1,2 ..., n}, n are frame number.
If calculate the moving degree of entropy wave, then x gets s respectively p, s b, s fObtain in the frequency band, the moving degree of entropy wave of each frequency band and every frame in the frame, use σ respectively Sp, σ Sb, σ SfRepresent.Wherein p get t, l, c}, b get 1,2 ..., 25}, f get 1,2 ..., n}, n are frame number.
4, in assigning process step by step, choose unit contrast energy hunting degree by allocation model and spend with entropy wave is moving, determine the Bit Allocation in Discrete pattern.
In the interframe Bit Allocation in Discrete: if σ Ef>σ Sf, choose Bit Allocation in Discrete pattern based on energy.Otherwise σ Ef≤ σ Sf, choose Bit Allocation in Discrete pattern based on spacing perception entropy.
In the frame Nepit distributes: if σ Eb>σ Sb, choose Bit Allocation in Discrete pattern based on energy.Otherwise σ Eb≤ σ Sb, choose Bit Allocation in Discrete pattern based on spacing perception entropy.
In the frequency band Nepit distributes: if σ Ep>σ Sp, choose Bit Allocation in Discrete pattern based on energy.Otherwise σ Ep≤ σ Sp, choose Bit Allocation in Discrete pattern based on spacing perception entropy.
Step 3, select module to choose the coding mode type of every frame input signal,, change step 4 over to, carry out the interframe Bit Allocation in Discrete if adopt the variable bit rate coding by bit rate mode.If adopt the cbr (constant bit rate) coding, change step 5 over to, carry out the frame Nepit and distribute.
Step 4, every frame input signal is carried out Bit Allocation in Discrete by interframe Bit Allocation in Discrete module.
By the Bit Allocation in Discrete pattern that step 2 obtains, the Bit Allocation in Discrete standard under the utilization corresponding modes is carried out Bit Allocation in Discrete.If energy Bit Allocation in Discrete pattern then changes step 8 over to, carry out the interframe Bit Allocation in Discrete.If spacing perception entropy Bit Allocation in Discrete pattern then changes step 9 over to, carry out the interframe Bit Allocation in Discrete.
Step 5, each frequency band in the frame is carried out Bit Allocation in Discrete by frame Nepit distribution module.
By the Bit Allocation in Discrete pattern that step 2 obtains, the Bit Allocation in Discrete standard under the utilization corresponding modes is carried out Bit Allocation in Discrete.If energy Bit Allocation in Discrete pattern then changes step 8 over to, carry out the frame Nepit and distribute.If spacing perception entropy Bit Allocation in Discrete pattern then changes step 9 over to, carry out the frame Nepit and distribute.
Step 6, choose module and choose concern frequency band in the step 4,, change step 7 over to if pay close attention to frequency band by paying close attention to frequency band.If not the concern frequency band changes step 10 over to.At different Bit Allocation in Discrete patterns, use different concern frequency band selection standards.
The embodiment of this step is:
The value of energy threshold and space weight thresholding can be set in advance as required, and the embodiment of the invention realizes by the manner of comparison of weight, the energy weight w that asks for before can utilizing easily EbWith SPE weight w Sb, only need to choose module and preestablish energy weight threshold value at the concern frequency band With spacing perception entropy weight threshold value.Also can adopt other data relevant to judge during concrete enforcement and pay close attention to frequency band with energy and spacing perception entropy.
If energy Bit Allocation in Discrete pattern is imported the energy weight w of each frequency band Eb, contrast w EbWith Magnitude relationship, if w eb > ∂ , Then frequency band b is judged to the concern frequency band, changes step 7 over to.Otherwise, then frequency band b is judged to non-concern frequency band, change step 10 over to.Wherein b get 1,2 ...., 25}.
If spacing perception entropy Bit Allocation in Discrete pattern is imported the SPE weight w of each frequency band Sb, contrast w SbWith the magnitude relationship of β, if w Sb>β then is judged to the concern frequency band with frequency band b, changes step 7 over to.Otherwise, then frequency band b is judged to non-concern frequency band, change step 10 over to.Wherein b get 1,2 ...., 25}.
Step 7, each spatial parameter carries out Bit Allocation in Discrete in the frequency band to paying close attention to by frequency band Nepit distribution module.
By the Bit Allocation in Discrete pattern that step 2 obtains, the Bit Allocation in Discrete standard under the utilization corresponding modes is carried out Bit Allocation in Discrete.If energy Bit Allocation in Discrete pattern then changes step 8 over to, carry out the frequency band Nepit and distribute.If spacing perception entropy Bit Allocation in Discrete pattern then changes step 9 over to, carry out the frequency band Nepit and distribute.
Step 8, based on energy, estimation Bit Allocation in Discrete weight is carried out Bit Allocation in Discrete.
The embodiment of this step is:
Interframe Bit Allocation in Discrete: the energy e that contrasts every frame signal f, calculate the shared weight w of every frame energy Ef, computing formula is shown in (formula 15).According to weight, calculate the bit number B that every frame should distribute Ef, carry out the interframe Bit Allocation in Discrete, computing formula is shown in (formula 16).
w ef = e f / Σ f = 1 n e f (formula 15)
B Ef=w Ef* B (formula 16)
Wherein B is total bit number of input signal, f get 1,2 ..., n}, n are frame number.
The frame Nepit distributes: the energy e of each band signal in the contrast frame b, calculate the shared weight w of each frequency band energy Eb, computing formula is shown in (formula 17).According to weight, calculate the bit number B that each frequency band should distribute in the frame Eb, to carry out the frame Nepit and distribute, computing formula is shown in (formula 18).
w eb = e b / Σ b = 1 25 e b (formula 17)
B Eb=w Eb* B Ef(formula 18)
B wherein EfBe the bit number of frequency band place frame, b get 1,2 ..., and 25}, f get 1,2 ..., n}, n are frame number.
The frequency band Nepit distributes: the energy e of each spatial parameter signal in the contrast frequency band p, calculate the shared weight w of each spatial parameter energy Ep, computing formula is shown in (formula 19).According to weight, calculate the bit number B that each spatial parameter distributes Ep, to carry out the frequency band Nepit and distribute, computing formula is shown in (formula 20).
w Ep=e p/ e t+ e l+ e c(formula 19)
B Ep=w Ep* B Eb(formula 20)
B wherein EbBe the bit number of frequency band b, p get t, l, c}, b get 1,2 ...., 25}.
Step 9, based on spacing perception entropy, estimation Bit Allocation in Discrete weight is carried out Bit Allocation in Discrete.
The specific embodiment of this step is:
Interframe Bit Allocation in Discrete: the spacing perception entropy s that contrasts every frame signal f, calculate the shared weight w of every frame spacing perception entropy Sf, computing formula is shown in (formula 21).According to weight, calculate the bit number B that every frame should distribute Sf, carry out the interframe Bit Allocation in Discrete, computing formula is shown in (formula 22).
w ef = s f / Σ f = 1 n s f (formula 21)
B Sf=w Sf* B (formula 22)
Wherein B represents total bit number of input signal, f get 1,2 ..., n}, n are frame number.
The frame Nepit distributes: the spacing perception entropy s of each frequency band in the contrast frame b, calculate the shared weight w of each frequency band spacing perception entropy in the frame Sb, computing formula is shown in (formula 23).According to weight, calculate the bit number B that each frequency band should distribute in the frame Sb, to carry out the frame Nepit and distribute, computing formula is shown in (formula 24).
w sb = s b / Σ b = 1 25 s b (formula 23)
B Sb=w Sb* B Sf(formula 24)
Wherein b get 1,2 ...., 25}, B SfBit number for frequency band place frame.
The frequency band Nepit distributes: the s of spatial parameter in the contrast frequency band p, the shared weight w of spacing perception entropy of spatial parameter in the calculating frequency band Sp, computing formula is shown in (formula 25).According to weight, calculate the bit number B that each spatial parameter distributes in the frequency band Sp, to carry out the frequency band Nepit and distribute, computing formula is shown in (formula 26).
w Sp=s p/ s t+ s l+ s c(formula 25)
B Sp=w Sp* B Sb(formula 26)
B wherein SbBe the bit number of frequency band b, p get t, l, c}, b get 1,2 ...., 25}.
Step 10, receive the bit stream distribute, output code flow by the code stream forming module.

Claims (10)

1. the Bit distribution method of a progressively fine spacing parameter is characterized in that: comprise following steps,
Step 1 is carried out processing of branch frame and frequency band division processing to input signal;
Step 2 is carried out the Bit Allocation in Discrete pattern and is chosen, when promptly choosing the interframe Bit Allocation in Discrete, the Bit Allocation in Discrete pattern that adopts respectively when dividing timing and frequency band Nepit to distribute of frame Nepit;
In step 2, choose the Bit Allocation in Discrete pattern automatically according to energy, spacing perception entropy and the fluctuation degree of input signal, promptly adopt energy Bit Allocation in Discrete pattern or spacing perception entropy Bit Allocation in Discrete pattern; Based on energy, estimation Bit Allocation in Discrete weight was carried out Bit Allocation in Discrete when described energy Bit Allocation in Discrete pattern was meant Bit Allocation in Discrete; Based on spacing perception entropy, estimation Bit Allocation in Discrete weight was carried out Bit Allocation in Discrete when described spacing perception entropy Bit Allocation in Discrete pattern was meant Bit Allocation in Discrete;
Step 3 is chosen the type of coding of every frame input signal,
If select the variable bit rate coding for use, then the Bit Allocation in Discrete pattern that obtains according to step 2 is carried out the interframe Bit Allocation in Discrete to every frame input signal, then each frequency band in the frame is carried out the frame Nepit and distributes, and obtains each bandwidth assignment result in the frame; If select the cbr (constant bit rate) coding for use, then the Bit Allocation in Discrete pattern that obtains according to step 2 uses the Bit Allocation in Discrete standard under the corresponding modes that each frequency band in the frame is carried out the distribution of frame Nepit, obtains each bandwidth assignment result in the frame;
Step 4 is chosen the concern frequency band according to the Bit Allocation in Discrete pattern that step 2 obtains, and its concrete mode is,
If energy Bit Allocation in Discrete pattern, then energy and the energy threshold with each frequency band in every frame compares, exceed threshold value and then be judged to the concern frequency band, each spatial parameter carries out the distribution of frequency band Nepit by energy Bit Allocation in Discrete pattern in the frequency band to paying close attention to, and exports each spatial parameter bit allocation result code stream; Otherwise then be judged to non-concern frequency band, interior each bandwidth assignment of output frame is code stream as a result;
If spacing perception entropy Bit Allocation in Discrete pattern, then spacing perception entropy and the spacing perception entropy thresholding with each frequency band in every frame compares, exceed threshold value and then be judged to the concern frequency band, each spatial parameter carries out the distribution of frequency band Nepit by spacing perception entropy Bit Allocation in Discrete pattern in the frequency band to paying close attention to, and exports each spatial parameter bit allocation result code stream; Otherwise then be judged to non-concern frequency band, interior each bandwidth assignment of output frame is code stream as a result.
2. Bit distribution method according to claim 1 is characterized in that:
Described fluctuation degree comprises energy hunting degree and the moving degree of entropy wave; The energy of described input signal obtains by the energy of asking in the frequency band each frequency band in each spatial parameter, the frame and every frame successively, obtains in the frequency band energy hunting degree of each frequency band in each spatial parameter, the frame and every frame respectively according to the energy of each frequency band and every frame in each spatial parameter, the frame in the frequency band; The spacing perception entropy of described input signal obtains by the spacing perception entropy of asking in the frequency band each frequency band in each spatial parameter, the frame and every frame successively, obtains in the frequency band the moving degree of entropy wave of each frequency band in each spatial parameter, the frame and every frame respectively according to the spacing perception entropy of each frequency band and every frame in each spatial parameter, the frame in the frequency band;
It is as follows specifically to choose implementation,
If the energy hunting degree of every frame greater than the moving degree of entropy wave, when the interframe Bit Allocation in Discrete, adopts energy Bit Allocation in Discrete pattern; If the energy hunting degree of every frame adopts spacing perception entropy Bit Allocation in Discrete pattern smaller or equal to the moving degree of entropy wave;
If the energy hunting degree of each frequency band divides timing greater than the moving degree of entropy wave at the frame Nepit in the frame, adopt energy Bit Allocation in Discrete pattern; If the energy hunting degree of every frame adopts spacing perception entropy Bit Allocation in Discrete pattern smaller or equal to the moving degree of entropy wave;
If the energy hunting degree of each spatial parameter divides timing greater than the moving degree of entropy wave at the frequency band Nepit in the frequency band, adopt energy Bit Allocation in Discrete pattern; If the energy hunting degree of every frame adopts spacing perception entropy Bit Allocation in Discrete pattern smaller or equal to the moving degree of entropy wave.
3. Bit distribution method according to claim 2 is characterized in that:
The energy acquisition mode of each spatial parameter is in the described frequency band, asks for the value of spatial parameter earlier, calculates the energy that each spatial parameter is comprised in the frequency band then; Be that its computing formula is:
e p=δ p 2 (1)
E wherein pBe the energy that each spatial parameter among the frequency band b comprises, δ pThe representation space parameter is in the value of frequency band b;
The energy of each frequency band is meant the energy that each frequency band comprises in the described frame, acquisition mode be ask all spatial parameters in the frequency band energy and; Be that its computing formula is:
e b=∑e p (2)
E wherein pThe energy that comprises for each spatial parameter among the frequency band b; P gets all spatial parameters;
The energy of described every frame be meant all frequency bands in every frame energy and; Be that its computing formula is:
e f = Σ b = 1 m e b - - - ( 3 )
E wherein bBe the energy that frequency band b comprises, f get 1,2 ..., n}, n are frame number, the frequency band number of m for dividing.
4. Bit distribution method according to claim 3 is characterized in that: adopt following formula when the energy hunting of asking for each frequency band in each spatial parameter in the frequency band, the frame and every frame is spent
σ e = E ( x 2 ) - E 2 ( x ) - - - ( 7 )
Wherein x gets the energy of each spatial parameter in the frequency band, interior each frequency band of frame and every frame respectively.
5. Bit distribution method according to claim 3 is characterized in that:
When (a) the Bit Allocation in Discrete pattern that adopts during selected interframe Bit Allocation in Discrete in the step 2 was energy Bit Allocation in Discrete pattern, the specific implementation of every frame input signal being carried out the interframe Bit Allocation in Discrete was,
At first, contrast the energy e of every frame signal f, calculate the shared weight w of every frame energy Ef, computing formula:
w ef = e f / Σ f = 1 n e f - - - ( 8 )
Then, the bit number B that should distribute according to the every frame of weight calculation Ef, carry out the interframe Bit Allocation in Discrete, computing formula:
B ef=w ef×B (9)
Wherein B is total bit number of input signal, f get 1,2 ..., n}, n are frame number;
When (b) the Bit Allocation in Discrete pattern that selected frame Nepit divides timing to adopt in the step 2 is energy Bit Allocation in Discrete pattern, each frequency band in the frame carried out the specific implementation that the frame Nepit distributes is,
At first, the energy e of each band signal in the contrast frame b, calculate the shared weight w of each frequency band energy Eb, computing formula:
w eb = e b / Σ b = 1 m e b - - - ( 10 )
Then, the bit number B that should distribute according to each frequency band in the weight calculation frame Eb, carry out the frame Nepit and distribute computing formula:
B eb=w eb×B ef (11)
B wherein EfBe the bit number of frequency band place frame, the frequency band number of m for dividing, f get 1,2 ..., n}, n are frame number;
When (c) the Bit Allocation in Discrete pattern that selected frequency band Nepit divides timing to adopt in the step 2 is energy Bit Allocation in Discrete pattern, carries out the specific implementation that the frequency band Nepit distributes and be paying close attention to each spatial parameter in the frequency band,
At first, the energy e of each spatial parameter signal in the contrast frequency band p, calculate the shared weight w of each spatial parameter energy Ep, computing formula:
w ep=e p/∑e p (12)
Then, the bit number B that distributes according to each spatial parameter of weight calculation Ep, carry out the frequency band Nepit and distribute computing formula:
B ep=w ep×B eb (13)
B wherein EbBe the bit number of frequency band b, p gets all spatial parameters.
6. Bit distribution method according to claim 2 is characterized in that:
The spacing perception entropy s of each spatial parameter in the described frequency band pAcquisition mode is, calculates each spatial parameter value earlier, the spatial information amount that obtains each spatial parameter at last and comprised; Be that computing formula is:
s p = 1 N α log δ p Δξ ( b ) - - - ( 4 )
S wherein pBe the spatial perception entropy of spatial parameter, δ pThe representation space parameter is in the value of frequency band b,
Δ ξ (b) representation space parameter is in the finite resolving power of frequency band b, and α reflects the amplitude compression of sense of hearing perception, and N is the frame length of time-frequency conversion, and log is the end with any natural number, and p gets all spatial parameters;
The spacing perception entropy s of each frequency band in the described frame b, be meant the spacing perception entropy sum of all spatial parameters in each frequency band; Be that its computing formula is:
s b=∑s p (5)
S wherein pBe the spatial perception entropy of spatial parameter, can calculate by formula (4); P gets all spatial parameters;
The spacing perception entropy s of described every frame f, be meant all frequency band spacing perception entropy sums that a frame comprises; Be that its computing formula is:
s f = Σ b = 1 m s b - - - ( 6 )
S wherein bBe the spacing perception entropy of frequency band b, can calculate by formula (5); The frequency band number of m for dividing, f get 1,2 ..., n}, n are frame number.
7. Bit distribution method according to claim 6 is characterized in that: the entropy wave of asking for each spatial parameter in the frequency band, interior each frequency band of frame and every frame moves and adopts following formula when spending
σ s = E ( x 2 ) - E 2 ( x ) - - - ( 7 )
Wherein x gets the spacing perception entropy of each spatial parameter in the frequency band, interior each frequency band of frame and every frame, i.e. s respectively p, s b, s f
8. Bit distribution method according to claim 6 is characterized in that:
When (A) the Bit Allocation in Discrete pattern that adopts during selected interframe Bit Allocation in Discrete in the step 2 was spacing perception entropy Bit Allocation in Discrete pattern, the specific implementation of every frame input signal being carried out the interframe Bit Allocation in Discrete was,
At first, contrast the spacing perception entropy s of every frame signal f, calculate the shared weight w of every frame spacing perception entropy Sf, computing formula:
w sf = s f / Σ f = 1 n s f - - - ( 14 )
Then, the bit number B that should distribute according to the every frame of weight calculation Sf, carry out the interframe Bit Allocation in Discrete, computing formula:
B sf=w sf×B (15)
Wherein B represents total bit number of input signal, f get 1,2 ..., n}, n are frame number;
When (B) the Bit Allocation in Discrete pattern that selected frame Nepit divides timing to adopt in the step 2 is spacing perception entropy Bit Allocation in Discrete pattern, each frequency band in the frame carried out the specific implementation that the frame Nepit distributes is,
At first, the spacing perception entropy s of each frequency band in the contrast frame b, calculate the shared weight w of each frequency band energy in the frame Sb, computing formula:
w sb = s b / Σ b = 1 m s b - - - ( 16 )
Then, the bit number B that should distribute according to each frequency band in the weight calculation frame Sb, carry out the frame Nepit and distribute computing formula:
B sb=w sb×B sf (17)
Wherein m is the frequency band number of division, B SfBit number for frequency band place frame;
When (C) the Bit Allocation in Discrete pattern that selected frequency band Nepit divides timing to adopt in the step 2 is spacing perception entropy Bit Allocation in Discrete pattern, carries out the specific implementation that the frequency band Nepit distributes and be paying close attention to each spatial parameter in the frequency band,
At first, the s of spatial parameter in the contrast frequency band p, the shared weight w of spacing perception entropy of spatial parameter in the calculating frequency band Sp, computing formula:
w sp=s p/∑s p (18)
Then, the bit number B that distributes according to each spatial parameter in the weight calculation frequency band Sp, carry out the frequency band Nepit and distribute computing formula:
B sp=w sp×B sb (19)
B wherein SbBe the bit number of frequency band b, p gets all spatial parameters.
9. according to claim 1 or 2 or 3 or 4 or 5 or 6 or 7 or 8 described Bit distribution methods, it is characterized in that: default energy weight threshold value θ and spacing perception entropy weight threshold value;
In step 4, if the Bit Allocation in Discrete pattern that selected frequency band Nepit divides timing to adopt in the step 2 is an energy Bit Allocation in Discrete pattern, by comparing the energy weight w of each frequency band EbWith the magnitude relationship of energy weight threshold value θ, realize the energy and the energy threshold of each frequency band in every frame are compared; If the Bit Allocation in Discrete pattern that selected frequency band Nepit divides timing to adopt in the step 2 is a spacing perception entropy Bit Allocation in Discrete pattern, by comparing the spacing perception entropy weight w of each frequency band SbWith the magnitude relationship of pre-set space perceptual entropy weight threshold value, realize the spacing perception entropy and the spacing perception entropy thresholding of each frequency band in every frame are compared.
10. Bit Allocation in Discrete device that is used for claim 1 or 2 or 3 or 4 or 5 or 6 or 7 or 8 described Bit distribution methods is characterized in that: comprises with the lower part,
Pretreatment module is used for input signal is carried out processing of branch frame and frequency band division processing;
Bit rate mode is selected module, is used to choose the type of coding of every frame input signal;
Interframe Bit Allocation in Discrete module is used for every frame input signal is carried out Bit Allocation in Discrete;
Frame Nepit distribution module is used for each frequency band in the frame is carried out Bit Allocation in Discrete;
Frequency band Nepit distribution module is used for carrying out Bit Allocation in Discrete to paying close attention to each spatial parameter of frequency band;
Pay close attention to frequency band and choose module, be used for choosing the concern frequency band of every frame signal;
The Bit Allocation in Discrete pattern is chosen module, is used to choose different Bit Allocation in Discrete patterns;
The code stream forming module is used for exporting each bandwidth assignment result in each spatial parameter bit allocation result or the frame with the code stream form;
Wherein, the Bit Allocation in Discrete pattern is chosen module and is linked to each other with pretreatment module, interframe Bit Allocation in Discrete module and frequency band Nepit distribution module respectively; Bit rate mode selection module is chosen module with interframe Bit Allocation in Discrete module, frame Nepit distribution module and Bit Allocation in Discrete pattern respectively and is linked to each other; Interframe Bit Allocation in Discrete module links to each other with frame Nepit distribution module; The concern frequency band is chosen module and is linked to each other with the code stream forming module with frame Nepit distribution module, frequency band Nepit distribution module respectively, and frequency band Nepit distribution module links to each other with the code stream forming module respectively.
CN2009100609837A 2009-03-06 2009-03-06 Bit distribution method and apparatus with progressively fine spacing parameter Expired - Fee Related CN101499279B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2009100609837A CN101499279B (en) 2009-03-06 2009-03-06 Bit distribution method and apparatus with progressively fine spacing parameter

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2009100609837A CN101499279B (en) 2009-03-06 2009-03-06 Bit distribution method and apparatus with progressively fine spacing parameter

Publications (2)

Publication Number Publication Date
CN101499279A CN101499279A (en) 2009-08-05
CN101499279B true CN101499279B (en) 2011-11-02

Family

ID=40946325

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2009100609837A Expired - Fee Related CN101499279B (en) 2009-03-06 2009-03-06 Bit distribution method and apparatus with progressively fine spacing parameter

Country Status (1)

Country Link
CN (1) CN101499279B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101800050B (en) * 2010-02-03 2012-10-10 武汉大学 Audio fine scalable coding method and system based on perception self-adaption bit allocation
CN102184733B (en) * 2011-05-17 2012-07-25 武汉大学 Audio attention-based audio quality evaluation system and method
CN103544957B (en) 2012-07-13 2017-04-12 华为技术有限公司 Method and device for bit distribution of sound signal
CN103065634B (en) * 2012-12-20 2014-11-19 武汉大学 Three-dimensional audio space parameter quantification method based on perception characteristic
GB2582749A (en) * 2019-03-28 2020-10-07 Nokia Technologies Oy Determination of the significance of spatial audio parameters and associated encoding

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101162904A (en) * 2007-11-06 2008-04-16 武汉大学 Space parameter stereo coding/decoding method and device thereof
CN101282479A (en) * 2008-05-06 2008-10-08 武汉大学 Method for encoding and decoding airspace with adjustable resolution based on interesting area

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101162904A (en) * 2007-11-06 2008-04-16 武汉大学 Space parameter stereo coding/decoding method and device thereof
CN101282479A (en) * 2008-05-06 2008-10-08 武汉大学 Method for encoding and decoding airspace with adjustable resolution based on interesting area

Also Published As

Publication number Publication date
CN101499279A (en) 2009-08-05

Similar Documents

Publication Publication Date Title
CN101223573B (en) Selectively using multiple entropy models in adaptive coding and decoding
CN1123866C (en) Dual subframe quantization of spectral magnitudes
CN1954642B (en) Multi-channel synthesizer and method for generating a multi-channel output signal
CN101223582B (en) Audio frequency coding method, audio frequency decoding method and audio frequency encoder
CN101268351B (en) Robust decoder
CN101223576B (en) Method and apparatus to extract important spectral component from audio signal and low bit-rate audio signal coding and/or decoding method and apparatus using the same
CN101188878B (en) A space parameter quantification and entropy coding method for 3D audio signals and its system architecture
CN101371447B (en) Complex-transform channel coding with extended-band frequency coding
KR20200100061A (en) Apparatus and method for encoding or decoding directional audio coding parameters using different time/frequency resolutions
CN101499279B (en) Bit distribution method and apparatus with progressively fine spacing parameter
CN100405460C (en) Coding an audio signal
CN101114450B (en) Speech encoding selectivity encipher method
US9805729B2 (en) Encoding device and method, decoding device and method, and program
CN103151047A (en) Multi-object audio encoding and decoding method and apparatus thereof
CN104011794A (en) Audio encoder with parallel architecture
CN105144288A (en) Advanced quantizer
CN104541326A (en) Device and method for processing audio signal
CN103262158A (en) Device and method for postprocessing decoded multi-hannel audio signal or decoded stereo signal
JP2009198612A (en) Encoding device, encoding method and encoding program
CN102243876B (en) Quantization coding method and quantization coding device of prediction residual signal
EP2296143B1 (en) Audio signal decoding device and balance adjustment method for audio signal decoding device
US8601039B2 (en) Computation apparatus and method, quantization apparatus and method, and program
JP2004325633A (en) Method and program for encoding signal, and recording medium therefor
CN102855876A (en) Audio encoder, audio encoding method and program
KR101730362B1 (en) Inter-channel level difference calculating method and apparatus

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20111102

Termination date: 20150306

EXPY Termination of patent right or utility model