Embodiment
Referring to Fig. 1, wherein show the block diagram that schematically illustrates according to a kind of code device 100 of the present invention.
Code device 100 comprises a subrane filter 10, first and second feeling parameter estimating device 20 and 30, first, second and 40,50 and 60, quantization devices 70 of the 3rd allocation units and a formating circuit 80.
In code device 100, will be by N (such as 2) bar passage (promptly first (or a left side) and second (or right) passage) the input digital audio signal X1 (m of the i frame (or present frame) that receives, i) with X2 (s, i) act on the first feeling parameter estimating device 20 and the subrane filter 10, wherein each input digital audio signal comprises M and S sampling, thus m=0,1,, M-1; S=0,1 ..., S-1, and M and S be positive integer, wherein each M and the number of S sampling are to be directly proportional with sampling frequency from respectively this input digital audio signal of these passages.Here used " frame " represented a part corresponding to the digital audio and video signals of the audio sample of a fixed number, and is a processing unit of encoding and decoding digital audio and video signals.
As shown in the figure, subrane filter 10 comprises a plurality of subrane filters, such as two subrane filters 11 and 12, they are connected in parallel, so that receive the input digital audio signal of present frame simultaneously, and a kind of subrane filtering technique of knowing in the employing present technique is carried out the filtering from the input digital audio signal of first and second passage, this filtering technique is such as being disclosed in IS0/IEC JTCI/SC2/WG11, " part 3; audio frequency suggestion ", the method in the so-called mpeg audio algorithm described in the CD-11172-3 (1991).This is that respectively this subrane filter 11 and 12 plays and will have sampling frequency f
sInput digital audio signal split into the individual f of having of B (such as 32)
sThe effect of the uniformly-spaced subrane of the sampling frequency of/B, and with the division the subrane audio sample offer quantization device 70.
On the other hand, the input digital audio signal that the first feeling parameter estimating device 20 receives from the present frame of first and second passage, and utilize such as a kind of psychoacoustic model of in the mpeg audio algorithm, discussing, carry out estimating signal-mask than (SMR) data SMR1 and SMR2, sound pressure level P1 and P2 and mask threshold value M1 and M2 for being included in from each subrane in the present frame of first and second passage.SMR1 from each subrane of first passage draws from following formula:
SMR1(j)=P1(j)-M1(j)
Formula (1) wherein j is a partial wave hop count mark, j=0, and 1 ..., B-1, B are the sum of the subrane in the frame; SMR1 (j) is the signal-mask ratio among the subrane j of first passage; P1 (j) is the sound pressure level from the subrane j of the first passage of FFT (fast Fourier transform) estimation; M1 (j) is the mask threshold value among the subrane j of first passage; And SMR1 (j), P1 (j) and the unit of M1 (j) are dB (decibels).
Similarly, the SMR2 from each subrane of second channel can derive with following formula: SMR2 (j)=P2 (j)-M2 (j) dB
Formula (2) wherein j has previously defined identical meanings.
The mask threshold value is represented the limit that can hear, and it is that a kind of intrinsic of sound can be heard the increment sum that the appearance other tone and composition non-pitch of the limit or threshold value and audio signal causes.Then, signal-the mask of first and second passage is presented to the 3rd allocation units 60 than data SMR1 (j) and SMR2 (j), simultaneously the sound pressure level P1 (j) of first and second passage and P2 (j) and mask threshold value M1 (j) and M2 (j) are coupled on the second feeling parameter estimating device 30 that comprises the average and standard deviation estimator 34 of a perceptual entropy estimation device 32 and.
Perceptual entropy estimation device 32 plays the sound pressure level P1 (j) and P2 (j) and mask threshold value M1 (j) and M2 (j) according to 20 feed-ins of the first feeling parameter estimating device, is the i frame estimation perceptual entropy PE1 (i) of first and second sound channel and the effect of PE2 (i).The perceptual entropy of the i frame of first passage as knowing in the present technique, can be expressed as follows:
Formula (3) is i wherein, and j and B have previously defined identical meanings.
Similarly, the perceptual entropy PE2 (i) of the i frame of second channel as knowing in the present technique, can draw from following formula:
Formula (4) is i wherein, and j has previously defined identical implication with B.
Formula (3) can be used so-called rate distortion theory with (4) and draw; And corresponding to perceptual entropy according to the human auditory.Then, will estimate on the device 32 that the perceptual entropy of i frame of first and second passage of estimation delivers to second allocation units 50 and average and standard deviation estimator 34 in perceptual entropy.
Adopt average and standard deviation estimator 34 to make up the perceptual entropy of estimation of the frame of individual current and its front of the Q (such as 4) of first and second passage, be PE1 (i-1), PE1 (i), PE2 (i-1) and PE2 (i), they are to divide coordination adaptively between first and second passage for the processing according to first allocation units 40, and estimate what device was presented from perceptual entropy, first allocation units 40 will contrast Fig. 2 below and describe in detail; And utilize an interchannel frame group's of the current frame with the front of four of comprising first and second passage the panesthesia entropy of estimation, of their statistical property of estimation expression average with a standard deviation parameter.The mean parameter PEM of interchannel frame group's panesthesia entropy, as knowing in the present technique, can estimate as follows:
Formula (5) wherein p is a frame number mark that is used among the interchannel frame group, p=0, and 1 ... Q-1, Q are this interchannel frame group's totalframes; PE (p) then represents the perceptual entropy of the p frame among this interchannel frame group.
Correspondingly, the standard deviation parameter PEstd of this interchannel frame group's panesthesia entropy as knowing in the present technique, can be expressed as follows:
Formula (6) wherein p and Q has previously defined identical meanings.
In a preferred embodiment of the present invention, in order adaptively the position to be distributed to each bar in first and second passage according to their perceptual entropy and to be included in each frame in each passage, average and standard deviation estimator 34 also make up the perceptual entropy of estimation of the frame of individual current and its front of the F (such as 2) of each bar of first and second passage, be PE1 (i) and PE1 (i-1) and PE2 (i) and PE2 (i-1), and become perceptual entropy PE (1) and PE (2) for frame all living creatures in two passages of first and second passage.Then, will on this average and standard deviation estimator 34, generate with the perceptual entropy PE (1) of first and second passage of estimation and PE (2) and on average and standard deviation parameter PEm and PEstd be transferred to first allocation units 40.
Adopt first allocation units 40 according to from the perceptual entropy PE (1) of average and standard deviation estimator 34 and PE (2) and average to come with standard deviation parameter PEm and PEstd be that frame group in two passages of first and second passage determines the position, and will be corresponding to being that determined of frame group's allocation information CBI1 and CBI2 offer second allocation units 50 and formating circuit 80 in two passages of first and second passage.
Referring to Fig. 2, wherein show the more detailed block diagram of first allocation units 40 shown in Fig. 1.First allocation units 40 comprise that one is differentiated level estimation device 41, multiplier 42, subtracter 43, a divider 44 and a bit allocation apparatus 45.
Differentiating level estimation device 41 plays according to average and standard deviation parameter PEm and PEstd from the average and standard deviation estimator 34 shown in Fig. 1, respectively the position is distributed to frame group in two passages of first and second passage for bit allocation apparatus 45, and the best of estimation interchannel frame group is differentiated the effect of level.According to a preferred embodiment of the present invention, differentiate the available following formula of level D (k) and draw for k of interchannel frame group:
D(k)=NF·PEstd·k
Formula (7) wherein k is a differentiation level number mark, and k=-q to q, q are a positive integer, and NF is a normalization factor among the interchannel frame group.
From formula (7) as seen, interchannel frame group's k the level spacing of differentiating between level D (k) and (k-1) the individual differentiation level D (k-1) depends on from average and the standard deviation PEstd of standard deviation estimator 34 and this interchannel frame group's normalization factor NF, differentiates the sum (for example 2q+1) of level and then is scheduled to.Should be appreciated that the sum of differentiating level can be definite according to the code efficiency and the sound quality of desired code device.Be used in the normalization factor NF that differentiates the interchannel frame group in the level estimation device 41 and preferably can be used to determine with average and standard deviation parameter PEm and the PEstd of standard deviation estimator 34 and a whole process (global) mean parameter PEgm and the PEstd average and an omnidistance standard deviation that is stored in advance in the memory (not shown), so that derive closely the best differentiation level of the interchannel frame group of mating with the human auditory of reality from average.Each omnidistance average mean parameter with omnidistance standard deviation can utilize the average and standard deviation parameter of estimating in a predetermined time duration easily to measure respectively.According to the present invention, interchannel frame group's normalization factor NF can draw from following formula:
Formula (8)
As seen, it should be noted that from formula (7) and (8) interchannel frame group's differentiation level can be used as an integral multiple of mean parameter and determines.To on differentiation level estimation device 41, estimation offer bit allocation apparatus 45 with differentiation level of being scheduled to and differentiation level sum.
On the other hand, multiplier 42 is presented the mean parameter PEm that comes with the average and standard deviation estimator 34 shown in Fig. 1 and be multiply by a coefficient F (for example being 2 in this example) who is stored in sum in the memory (not shown), that represent to be included in the frame in any one among the frame group in two passages in advance, generates an output parameter 2PEm after taking advantage of whereby.Then, the perceptual entropy PE (1) that the output parameter 2PEm that multiplier 42 is generated reaches from frame group in two passages of the average and standard deviation estimator 34 shown in Fig. 1 delivers to subtracter 43 with PE (2), this subtracter 43 is used for calculating the difference signal E (1) and E (2) of frame group in two passages by deduct each perceptual entropy PE (1) respectively from output parameter 2PEm with PE (2), and generates the difference signal E (1) and E (2) that calculates.Divider 44 is used for receiving the difference signal E (1) and E (2) from subtracter 43, whereby, each difference signal is divided into the predetermined frame number F (for example being 2 in this example) that is included in the passage in any one among the frame group, be respectively applied for the best differentiation level of dividing equally difference signal so that draw, and generate difference signal E (1)/2, E (2)/2 after removing.Subsequently, will differentiate estimation and predetermined differentiation level D (k) and the sum (being 2q+1) of differentiating level on the level estimation device 41, and the difference signal E (1)/2 that divider 44 generates offers bit allocation apparatus 45 simultaneously with E (2)/2.
Bit allocation apparatus 45 play according to from the differentiation level of differentiating level estimation device 41 with differentiate the level sum and from the difference signal of divider 44, be that among the frame group in two passages of first and second passage each is determined effect of position.According to a preferred embodiment of the present invention, the position of each passage distributes FB can determine as follows:
Formula (9) wherein r is as positive integer of port number target; FBm is an average bit, such as 3072 of every frames of 16 PCM (pulse code modulated) that have the 48KHz sampling frequency on the message transmission rate of every passage 128Kbps; BV is a predetermined position changing value; 2p+1 is the sum of predetermined differentiation level; I is a level number mark among the passage r; And F has previously defined identical meanings.
As seen, the position of r bar passage distributes FB (r) to determine by add the variation figure place that can derive from its second on the total FFBm of average bit from formula (9).It is next definite that pre-determined bit changing value BV wherein can be used as a value of the position excursion between minimum position that expression can distribute in the position that each interchannel changes and the multidigit; And frame group's level number mark I can be according to drawing with E (2)/2 from the decision level D (k) that differentiates level estimation device 41 and from each difference signal E (1)/2 of divider 44 in the passage of r bar passage.According to the present invention, in the passage of r bar passage frame group's level number mark I can be expressed as shown in Table (wherein supposed differentiate level be spaced apart 1.27 and differentiate level number mark k and be-2 to 2):
As seen, if frame group's difference signal E (r) is present between differentiation level-2.55 and-1.28 in the passage of r passage, then its level number mark I may be selected to be-1 from table 1; And if it is being differentiated between the level-1.27 and 1.26, then level number mark I may be selected to be 0, by that analogy.In this way, frame group's position distributes FB (r) can use formula (9) to determine expediently in the passage of r passage.
Then, will act on simultaneously on second allocation units 50 corresponding to the allocation information CBI1 of first and second passage of the position of determining for each passage on the allocation units 45 on the throne and CBI2 and from the perceptual entropy PEI (i) and the PE2 (i) of the estimation of the perceptual entropy shown in Fig. 1 device 32; And the allocation information CBI1 and the CBI2 of each passage offered formating circuit 80.
Later referring to Fig. 1, second allocation units 50 are according to from the perceptual entropy of the correspondence of perceptual entropy estimation device 32 and from the allocation information CBI1 and the CBI2 of first allocation units 40, for each frame in each among the frame group in two passages that are included in first and second passage is determined the position.On second allocation units 50, in two passages among the frame group position of each frame in each distribute a kind of the distribution technique that preferably can be used in the digital audio encoding apparatus to determine unsettled the owning together in the U.S. Patent application that this device is disclosed in " adaptive digital audio encoding apparatus and a kind of bit allocation method thereof " by name.
Subsequently, will be corresponding on second allocation units 50, being the allocation information FBI1 and the FBI2 of first and second passage of being included in two passages of first and second passage among the frame group the determined position of each frame in each, and offer the 3rd allocation units 60 simultaneously than data SMR1 (j) and SMR2 (j) from the signal-mask of the first feeling parameter estimating device 20 shown in Fig. 1; And allocation information FBI1 and FBI2 acted on the formating circuit 80.
The 3rd allocation units 60 receive the signal-mask of the first feeling parameter estimating device, 20 feed-ins than data SMR1 and SMR2, and the allocation information FBI1 and the FBI2 of each frame of providing of second allocation units 50, for each subrane in each frame that is included in frame group in two passages is determined the position, and will offer quantizer 70 and formating circuit 80 corresponding to the allocation information SBI1 and the SBI2 of the position of determining for each subrane of first and second passage respectively.Be used in the 3rd principle in the allocation units 60 and be to be no more than under the restriction of the figure place that this frame of sending from second allocation units 50 can utilize, optimize the total signal-mask ratio on the frame in employed figure place.Immediately, will act on simultaneously on the quantization device 70 that comprises a plurality of quantizers (such as 71 and 72) from the allocation information SBI1 of each subrane of first and second passage of the 3rd allocation units 60 and SBI2 and from the subrane audio sample of the part of subrane filter 11 and 12.
Each quantizer 71 and 72 plays according to the corresponding allocation information from the 3rd allocation units 60, quantize adaptively from the effect of this subrane filter 11 respectively, and respectively the quantization audio signal of this first and second passage offers formating circuit 80 with the subrane audio sample of 12 corresponding part.
On formating circuit 80, format is from the quantization audio sampling of this quantizer 71 respectively and 72 and from the allocation information of first, second and the 3rd allocation units 40,50 and 60, and they are transferred to transmitter (not shown) usefulness for transmission, improve code efficiency and sound quality whereby from the input digital audio signal of first and second passage.The principle of subrane filter 10, the first feeling parameter estimating device 20, the 3rd allocation units 60, quantization device 70 and formating circuit 80 and function basically with in the mpeg audio algorithm, can see those are identical.
Though the present invention illustrates and describes with reference to certain embodiments, person skilled in the art person is clear, can make many changes and correction under the condition that does not break away from defined invention spirit and scope in the appending claims.
Table 1
Differentiate the scope of level D | Level number mark (I) |
~-2.56 | -2 |
-2.55~-1.28 | -1 |
-1.27~1.26 | 0 |
1.27~2.54 | 1 |
2.55~ | 2 |