Background technology
Shown in Figure 1A-1B, as the DRA audio frequency coding and decoding technology of Chinese audio coding electron trade standard in recent years by being known in the industry.The more detailed content of relevant DRA (Digital RiseAudio) audio encoding and decoding technique can be referring to industry standard issue, standard sequence number SJ/T 11368-2006 in the Ministry of Information Industry's on January 4th, 2007, and the full content of this standard is incorporated this paper into by reference at this.In addition, in order narrating conveniently, hereinafter this standard to be abbreviated as " DRA standard ", and will abbreviate " DRA technology " as with DRA standard corresponding D RA audio encoding and decoding technique.
At present popular perceptual audio coder is two kinds of methods of general employing in Bit-Rate Control Algorithm.A kind of is CBR, i.e. constant bit rate, and such as AC3, layer 1 among the MPEG1 and layer 2 are applied to the DRA technology among the CMMB (China Mobile multimedia broadcasting) in addition.The advantage of CBR is to postpone to fix, and can not produce overflow and underflow in decoding end, and the bit control algolithm of coding side is simple simultaneously; Its shortcoming is because the non-stationary property of sound signal causes the quality instability of coded signal.Another kind is ABR, i.e. mean bit rate, and layer 3 (the promptly pandemic on the internet at present mp3) such as among the MPEG1 also have the AAC among the MPEG.The advantage of ABR is to make coding quality steady; Its shortcoming is to have increased delay, need be in the well-designed bit control algolithm of coding side so that do not produce overflow and underflow in decoding end.
As everyone knows, the principle of ABR bit control is that the frame of easy coding is encoded with less bit (being less than average bit), and deposits remaining bit in the bit pond; The frame that is difficult to coding is encoded with more bit (more than average bit), and required additional bit is extracted from the bit pond.The key that improves the efficient of ABR bit control is: under the situation of the factors such as scope of taking all factors into consideration bit rate, bit pond state, audio content and permission bit change, dope the required bit number of present frame.
In the algorithm of AAC, the ultimate principle that realizes ABR is to carry out the control of bit pond by perceptual entropy.Realize that in standard ISO/IEC 13818-7 bit control algolithm step is:
Step 1: calculate perceptual entropy pe by psychoacoustic model; Its psycho-acoustic model can be model 1 and the model 2 that MPEG provides; The perhaps article " estimation of perceptual entropy using noise masking criteria " by J.D.Johnston, IEEE, 1988 obtain;
Step 2: utilize formula (1) to calculate average bit mean_bits;
Wherein: bit_rate is a coding bit rate; Sampling_rate is the signals sampling frequency.
Step 3: utilize formula (2) to calculate Bit Allocation in Discrete according to perceptual entropy;
bit_allocation=pew1*PE+pew2*sqrt(PE)??????????(2)
Wherein PE is the perceptual entropy that step (1) draws; Pew1 is 0.3 in tempolabile signal, is 0.6 in the fast changed signal; Pew2 is 0.6 in tempolabile signal, in the fast changed signal is 24. bit_allocation to be restricted to 0 to 3000 at last.
Step 4: the variable that utilizes above-mentioned steps to draw calculates the bit more_bits that this frame will increase according to formula (3);
more_bits=bit_allocation-(mean_bits-side_info_bits)????????(3)
Wherein, Side_info_bits is the used bit number of side information.
Step 5: utilize formula (4) to calculate the bit number that this frame can be used
ifmore_bits>0:
available_bits=mean_bits+min(more_bits,bit_reservoir_state[frame])
ifmore_bits<0:
available_bits=mean_bits+max(more_bits,bit_reservoir_state[frame]-
max_bit_reservoir)
(4)
Remaining bit number in the bit pond when wherein: bit_reservoir_state[frame] being present frame frame; Max_bit_reservoir is the maximal bit tankage, and it is defined as 6144 * channel number in AAC.There is following shortcoming in said method: (1) is not controlled the bit pond, might can use up very soon the bit number in some signal bit ponds, does not have bit to use in the bit pond when the frame of editorial afterword face, causes the not steady of coding quality.(2) relying on perceptual entropy fully carries out bit control and has certain risk.Because being used to calculate the psychoacoustic model method of perceptual entropy has multiple, the result that every kind of psychoacoustic model calculates is inequality, might be too small and cause the bit that distributes very few to the perceptual entropy that some frame calculates, thereby the coding quality of this frame is descended, cause the binary encoding quality to descend.
But, actual and unexposed ABR bit rate control method and the system that is used for DRA in the prior art.
In addition, in view of CBR and ABR have relative merits separately, these two kinds of methods have application separately.Generally be applied in the occasion that broadcasting waits needs real-time relay such as CBR; And ABR generally is applied in the occasions such as sound accompaniment among Network Transmission download and the DVD.Because ABR has above-mentioned advantage, so popular scrambler all provides ABR to support at present.Therefore, in order to improve the code efficiency of DRA, need on the basis of existing DRA scrambler, realize support to the ABR coding; In addition, in order to reach the purpose of back compatible, should guarantee with existing DRA decoder decode DRA-ABR code stream.In the prior art and unexposed relevant therewith technology contents.
Summary of the invention
In order to address the above problem, the invention provides ABR Rate Control technology that is used for DRA and the DRA scrambler that uses this technology.
According to a first aspect of the invention, provide the ABR bit rate control method of a kind of DRA of being used for,, calculated the bit number of present frame according to the bit demand rate R of present frame and the bit budget rate R ' in bit pond.
Further, the bit demand rate R of present frame is the function of the coding easness r of present frame.Further, the relation of R and r is as follows:
Further, the coding easness r of present frame, following calculating:
Wherein, QPE
EstBe the quantification perceptual entropy estimated value of present frame, QPE
AvgAverage by quantification perceptual entropy and to obtain M frame before the present frame.
Further, the following method calculating of the pairing quantification perceptual entropy of a certain frame QPE (m) in M frame before the present frame:
Wherein, m representative frame sequence number, k represents the spectral coefficient sequence number, N represents the number of every frame spectral coefficient, X[m] the preceding spectral coefficient of [k] representative quantification,
Spectral coefficient after representative quantizes.
Further, the quantification perceptual entropy estimated value QPE of present frame
EstComputing method be:
Wherein, PE is the perceptual entropy of the present frame that goes out by the human auditory system Model Calculation, PE
AvgAverage by perceptual entropy and to obtain M frame before the present frame.
Further, the bit budget rate R ' in bit pond is the function of bit pond saturation degree F.Further, R ' is as follows with the relation of F:
Further, the following calculating of bit number available_bits of present frame: available_bits=mean_bits+Rmean_bitsR ', wherein, mean_bits is an average number of bits.
According to a further aspect of the invention, also provide the ABR Rate Control system of a kind of DRA of being used for, it comprises the counter of the bit number that is used for calculating present frame.
Further, counter comprises bit demand estimator and bit pool controller, and wherein, the bit demand estimator is used for calculating the bit demand rate R of present frame, and the bit pool controller is used for calculating the bit budget rate R ' in bit pond.
Further, present frame bit demand rate R is the function of the coding easness r of present frame.Further, the relation of described R and r is as follows:
Further, the following calculating of coding easness r of present frame:
Wherein, QPE
EstBe the quantification perceptual entropy estimated value of present frame, QPE
AvgAverage by quantification perceptual entropy and to obtain M frame before the present frame.
Further, the pairing quantification perceptual entropy of a certain frame QPE (m) of M frame before the present frame, following method is calculated:
Wherein, m representative frame sequence number, k represents the spectral coefficient sequence number, N represents the number of every frame spectral coefficient, X[m] the preceding spectral coefficient of [k] representative quantification,
Spectral coefficient after representative quantizes.
Further, the quantification perceptual entropy estimated value QPE of present frame
EstComputing method be:
Wherein, PE is the perceptual entropy of the present frame that goes out by the human auditory system Model Calculation, PE
AvgAverage by perceptual entropy and to obtain M frame before the present frame.
Further, the bit pool controller calculates the bit budget rate R ' in bit pond, and wherein, the bit budget rate R ' in bit pond is the function of bit pond saturation degree F.
Further, R ' is as follows with the relation of F:
Further, the bit number available_bits computing formula of present frame is: available_bits=mean_bits+Rmean_bitsR ', wherein, mean_bits is an average number of bits.
According to a further aspect of the invention, also provide a kind of DRA-ABR scrambler, it comprises ABR bit control module.Further, this ABR bit control module has been used the ABR bit rate control method according to first aspect present invention.
Based on technique scheme, the present invention is directed to the DRA algorithm and realized effective ABR Rate Control, and provide the DRA that possesses the ABR function audio coder based on this, that is, and the DRA-ABR scrambler.
Embodiment
By describing the preferred embodiments of the present invention hereinafter by accompanying drawing.Unnecessary details in the following description, function or the structure that becomes prior art will be described in detail, because will cause the ambiguous of introducing of the present invention.Identical parts in identical step or the system in the identical Reference numeral indicating means.
Typical DRA audio coder 100 has been shown in Figure 1A, and it can be realized by hardware, software and/or firmware.In brief, the related technology of DRA standard is exactly with a plurality of technology modules source sound (for example, input PCM sample) to be carried out signal Processing, to reach the almost purpose of lossless compress source sound.Above-mentioned a plurality of technology modules includes but not limited to: transient analysis module 120, multiresolution bank of filters module 122, linear scalar quantization module 130, quantification index coding module 132, code table are selected module 134, human auditory system model module 140, overall Bit Allocation in Discrete module 142 and multiplexing module 150.According to the relevant regulations of DRA standard, above-mentioned technology modules is essential module, and promptly standard compliant DRA output code flow (that is DRA standard code stream) must be through the code stream after the above-mentioned resume module.With it accordingly, typical DRA audio decoder has been shown among Figure 1B, it is used to receive the code stream by after the DRA coder processes, and by carrying out the inverse process of encoding encoding code stream is reduced to the output of PCM sample.
Present DRA scrambler is the CBR coding, and in order to improve the code efficiency of DRA, the present invention realizes the ABR coding to the DRA scrambler, and the DRA demoder need not change the ABR code stream of the DRA that just can decode, thereby realizes back compatible.
Illustrated among Fig. 2 according to the DRA scrambler 100 ' embodiment of the invention, that support ABR.In conjunction with shown in Figure 1, on the basis of Figure 1A, DRA scrambler 100 ' increases an ABR bit control module 141 between human auditory system model 140 and global assignment module 142.ABR bit control module 141 receives from the perceptual entropy of human auditory system model 140 outputs with from the spectral coefficient before and after the quantification of linear scalar quantization module 130, based on above-mentioned data computation and to the used bit number of overall Bit Allocation in Discrete module 142 output present frames.Preferably, ABR bit control module 141 adopts as the method for hereinafter describing in detail and calculates the used bit number of present frame.
Below by specific embodiment and in conjunction with Fig. 2-Fig. 5, introduce the ABR bit rate control method that is used for DRA in detail.
As shown in Figure 3, the position that shows before present frame m and the present frame m between M the frame concerns.Wherein, the value of M is preferably 8 or 16.
According to one embodiment of present invention,, need: 1) at first will estimate the quantification perceptual entropy of present frame, and utilize the quantification perceptual entropy of estimating to calculate bit demand rate R in order to obtain the bit number of present frame; 2) bit pond saturation degree is mapped as bit budget rate R ' and carries out the control of bit pond.At last, use 1) and 2) the result, promptly utilize bit demand rate and bit budget rate to calculate the bit number (output in ABR bit control module 141) of present frame, thereby effectively control overall Bit Allocation in Discrete (promptly, by the overall Bit Allocation in Discrete module 142 of ABR bit control module 141 controls), the final coding quality as far as possible stably that obtains.
As shown in Figure 4, according to a preferred embodiment of the present invention, the bit demand rate R of present frame is the function of present frame coding easness r, and its physical relationship can be described below:
Further, easness r can calculate with following formula:
Wherein, QPE
EstBe the quantification perceptual entropy estimated value of present frame, QPE
AvgAverage by quantification perceptual entropy and to obtain M frame before the present frame.Preferably, in the present embodiment, but the general value of M is 8 or 16.Especially, M frame is the continuous N frame before present frame and then before the present frame, as shown in Figure 3.
Further, obtain QPE
AvgThe time, needing to calculate earlier before the present frame the pairing quantification perceptual entropy of a certain frame QPE (m) in M the frame, its formula is as follows:
Wherein, m representative frame sequence number, k represents the spectral coefficient sequence number, N represents the number of every frame spectral coefficient, X[m] the preceding spectral coefficient of [k] representative quantification,
Spectral coefficient after representative quantizes.After utilizing above-mentioned formula to calculate the quantification perceptual entropy of each frame of M frame before the present frame, average again, calculate QPE
Avg
Further, the quantification perceptual entropy estimated value QPE of present frame
EstComputing method be:
Wherein, PE is the perceptual entropy (for example, from human auditory system model module 140) of the present frame that goes out by the human auditory system Model Calculation, PE
AvgBe to average by perceptual entropy to obtain to M frame before the present frame.
Especially, wherein PE can also be that psychoacoustic model 1 or the psychoacoustic model 2 that MPEG provides calculates gained.
In Fig. 5, according to a preferred embodiment of the present invention, the bit budget rate R ' in bit pond is the function of bit pond saturation degree F, that is:
Specifically, the computing formula of bit pond saturation degree F is as follows:
Wherein: S is the bit number in the current bit pond; S
MaxBe the maximum number bits in the bit pond.
In the present embodiment, utilizing the bit budget rate R ' in bit pond is the function of bit pond saturation degree F, reaches the control to the bit pond.
Through above step, can utilize the bit demand rate R and the bit budget rate R ' that calculate, calculate the bit number available_bits of present frame.Concrete formula is as follows: available_bits=mean_bits+Rmean_bitsR ', wherein, mean_bits is an average number of bits.
Particularly, the computing method of mean_bits are as follows:
Wherein, bit_rate is a coding bit rate; Sampling_rate is the signals sampling frequency.
Especially, can also adopt the function of the bit budget rate R ' in the function of bit demand rate R of different present frames and bit pond respectively to steady-state signal and transient signal.And then further adjust the function of bit demand rate R and the function of bit budget rate R '.
Simultaneously, the present invention also provides the ABR Rate Control system of a kind of DRA of being used for, and this system comprises counter, is used for calculating the bit number of present frame.As shown in Figure 6, counter comprises bit demand estimator 61 and bit pool controller 62.It should be noted that those skilled in the art can be understood that after reading this instructions: bit demand estimator 61 and bit pool controller 62 putting in order in system can't influence result of calculation.Wherein, bit demand estimator 61 is used for calculating present frame bit demand rate R; Bit pool controller 62 is used for calculating the bit budget rate R ' in bit pond.
As shown in Figure 4, according to one embodiment of present invention, the bit demand rate R of present frame is the function of the coding easness r of present frame, and concrete function is as follows:
Further, calculate easness r and can use following formula:
Wherein, QPE
EstBe the quantification perceptual entropy estimated value of present frame, QPE
AvgAverage by quantification perceptual entropy and to obtain M frame before the present frame.
Preferably, in the present embodiment, but the general value of M is 8 or 16.Especially, M frame is a continuous N frame before present frame and then before the present frame.
Further, obtain QPE
AvgThe time, needing to calculate earlier the present frame pairing quantification perceptual entropy of a certain frame QPE (m) of M frame before, its formula is as follows:
Wherein, m representative frame sequence number, k represents the spectral coefficient sequence number, N represents the number of every frame spectral coefficient, X[m] the preceding spectral coefficient of [k] representative quantification,
Spectral coefficient after representative quantizes.After utilizing above-mentioned formula to calculate the quantification perceptual entropy of each frame of M frame before the present frame, average again, calculate QPE
Avg
Further, the quantification perceptual entropy estimated value QPE of present frame
EstComputing method be:
Wherein, PE is the perceptual entropy of the present frame that goes out by the human auditory system Model Calculation, PE
AvgBe to average by perceptual entropy to obtain to M frame before the present frame.
Especially, wherein PE can also be that psychoacoustic model 1 or the psychoacoustic model 2 that MPEG provides calculates gained.
In Fig. 5, preferably, the bit budget rate R ' in bit pond is the function of bit pond saturation degree F, that is:
At length, the computing formula of bit pond saturation degree F is as follows:
Wherein: S is the bit number in the current bit pond; S
MaxBe the maximum number bits in the bit pond.
In the present embodiment, utilizing the bit budget rate R ' in bit pond is the function of bit pond saturation degree F, reaches the control to the bit pond.
Through above step, can further utilize the bit demand rate R and the bit budget rate R ' that calculate, obtain the bit number available_bits of present frame.For example: available_bits=mean_bits+Rmean_bitsR ', wherein, mean_bits is an average number of bits.
Particularly, the computing method of mean_bits are as follows:
Wherein, bit_rate is a coding bit rate; Sampling_rate is the signals sampling frequency.
Especially, can also adopt the function of the bit budget rate R ' in the function of bit demand rate R of different present frames and bit pond respectively to steady-state signal and transient signal.And then further adjust the function of bit demand rate R and the function of bit budget rate R '.
In addition, utilize method and system of the present invention, can reach remarkable result.Concrete method of testing is as follows.
Choose test code streams and be used 12 sections of MPEG, be two-channel, 48kHz, compression bit rate are 128kbps.Objective branch when the one and same coding device is adopted CBR and ABR coding respectively, as shown in table 1, wherein objective examination's software is EAQUAL, version is 0.1.3alpha.The value of objective difference branch (ODG) is 0 to-4, the wherein imperceptible damage of 0 representative, and-4 are representing stinking damage.。
Table 1CBR and ABR ODG contrast in objective minute
Test code streams |
??CBR |
??ABR |
??es01 |
??-0.74 |
??-0.7 |
??es02 |
??-0.27 |
??-0.24 |
??es03 |
??-0.27 |
??-0.26 |
??sc01 |
??-0.74 |
??-0.76 |
??sc02 |
??-1.07 |
??-1.09 |
??sc03 |
??-1.13 |
??-1.1 |
??sm01 |
??-0.82 |
??-0.88 |
??sm02 |
??-1.75 |
??-1.05 |
??sm03 |
??-1.03 |
??-0.98 |
??si01 |
??-0.97 |
??-0.92 |
??si02 |
??-1.18 |
??-1.04 |
??si03 |
??-1.52 |
??-1.39 |
On average |
??-0.9575 |
??-0.8675 |
For transient signal,, can improve coding quality greatly as can be seen from the table with ABR for sm02 and si02.And for the profuse signal of string signal, as si03, ABR also can improve coding quality.
Though described the present invention in conjunction with being considered to most realistic and optimum embodiment at present, but those skilled in the art are to be understood that and the invention is not restricted to the disclosed embodiments, on the contrary, the present invention is intended to cover various modifications and the equivalent construction that comprises within the spirit of claims and the category.Those skilled in the art can be understood that: can various deformation and/or improvement be used the present invention as being shown in specific embodiment ground, and this does not break away from the spirit or scope of the present invention of describing in broad mode.Therefore, to be considered to be descriptive but not determinate to the embodiment of this paper in all fields.