A kind of 16Kbps code check voice data compressed encoding tonequality method that improvesTechnical field
A kind of method that the present invention relates to 16Kbps code check audio data coding, is specifically related in digital multimedia system, a kind of method that improves 16Kbps code check voice data compressed encoding tonequality.
Background technology
The most basic mode of mankind's communication is exactly voice, and interpersonal information exchange functions can be realized in voice.Along with the high speed development of modern information technologies, voice signal is processed in direction, and new method and technology also emerge in an endless stream.Because the data volume of audio digital signals is quite large, if do not carry out compressed encoding, huge data volume brings very large pressure can to the transmission of voice signal, storage, is difficult to reach practical.Therefore, Speech Signal Compression coding techniques becomes a very crucial common technology in the fields such as current multimedia recreation, digital communication and broadcast.Increasing people has put in the research of speech data compress technique, and has formed gradually the standard of a set of international area.
As far back as 1972, the CCITT of CCITT just released G.711 coding standard.Its sampling rate is 8KHz, and each sampled value is used 8 bit Nonlinear A rules or μ rule to encode, i.e. the pcm encoder of 64Kbps.In order further to save bandwidth, at the eighties initial stage, CCITT has released G.721 standard, i.e. 32Kbps code check ADPCM encryption algorithm.Late nineteen eighties, has released again G.723 standard.This standard, on the basis of standard G.721, has formed 40Kbps, 32Kbps and 24Kbps code check ADPCM encryption algorithm.Nineteen ninety, International Telecommunications Union (ITU) has released G.726 standard, and it combines G.721 standard and G.723 standard, and has added 16Kbps code check ADPCM encryption algorithm.G.726 standard is widely used in the field such as digital cordless phone, network service.
In the application of wireless multimedia sensor network, need to gather transmission to the voice data in environment.But because performance and the power consumption of node are restricted, need data to save as much as possible bandwidth and storage space, need to keep when realization with low code check good tonequality.G.726,16Kbps code check is encoded, and to have occupied bandwidth few, can make full use of the feature of power system capacity, is widely used aspect the voice coding transmission in digital circuit multiplication equipment.But adopt the voice quality that G.726 standard obtains not high, have obvious noise, sound is more sharp-pointed, does not reach the tonequality of trunk call far away.Therefore, propose the good 16Kbps code check of a kind of tonequality G.726 coding method not only can improve the quality of communication, and communication channel is also possessed to the function of dilatation, have certain actual application value.
Summary of the invention
The object of the invention is to, a kind of method of the 16Kbps of raising code check voice data compressed encoding tonequality is provided, solve the G.726 poor problem of canonical algorithm tonequality of current 16Kbps code check.
In order to achieve the above object, the technical scheme of this method is as follows:
Improve a method for 16Kbps code check voice data compressed encoding tonequality, utilize the correlativity of amplitude between adjacent voice signal, dope the input value of next voice signal sample; Described method comprises:
Step 1, subtracts each other original linear PCM voice signal respectively with the prediction signal of former code check and high code check part, calculate differential signal;
Step 2, is used the adaptive quantizer of former code check and high code check part, and the differential signal of obtaining according to step 1 carries out adaptive quantizing, obtains respectively the quantization level number of 2 bit and 4 bit; Output using the adpcm code of 2 bit as coding module on the one hand, sends into quantization level contrary adaptive quantizer on the other hand;
Step 3, is used the contrary adaptive quantizer of former code check and high code check part, and the quantization level of obtaining according to step 2 and scaling factor, carry out respectively re-quantization, obtains the differential signal after quantizing;
Step 4, is used the reconstruction signal counter of former code check and high code check part, and the prediction signal that the differential signal after the quantification of obtaining according to step 3 and step 5 are obtained, draws reconstruction signal;
Step 5, is used the adaptive predictor of former code check and high code check part, and the reconstruction signal that the differential signal after the quantification of obtaining according to step 3 and step 4 are obtained, draws prediction signal.
Preferably, described adaptive quantizer comprises: LOG, is transformed into differential signal log-domain from linear domain; SUBTB, the logarithmic form calibration by reduction scaling factor to differential signal; QUAN, quantizes the differential signal in log-domain.
Preferably, described contrary adaptive quantizer, comprising: RECONST rebuilds quantized difference signal in log-domain; ADDA, is added to scaling factor the logarithmic form of quantized difference signal; ANTILOG, is transformed into linear domain quantized difference signal from log-domain.
Preferably, described adaptive predictor and reconstruction signal counter, comprise six rank systems at zero point and second order pole system, and described six rank systems at zero point comprise: ADDC, for obtaining the sign bit after quantized difference signal and prediction signal addition at zero point; ADDB, according to prediction signal and quantized difference signal, draws reconstruction signal; FLOATB, convert the two's complement of reconstruction signal to floating number, FLOATA, quantized difference signal is converted to floating number, and XOR, is used for realizing the XOR of difference signal and differential delay signal code position, TRIGB, be fallout predictor trigger module: UPB, be used for calculating the predictor coefficient at six rank zero points: FMULT, for realizing two multiplyings between floating number; Described second order pole system comprises UPA1 and UPA2, for completing the renewal of second order limit coefficient.
Preferably, described multiplier adopts the Model Design of time-sharing multiplex.
Further preferred, the input end count_FMULT of described multiplier is used for counting, and in the time counting down to 3, starts time-sharing multiplex multiplier, and time-sharing multiplex is after totally 8 times, and count_FMULT signal becomes 11, and prediction signal has been calculated.
The method of raising 16Kbps code check voice data compressed encoding tonequality of the present invention, utilize the correlativity of amplitude between adjacent voice signal, dope the input value of next voice signal sample, therefore only need to transmit the difference between real input signal sample and prediction signal sample in the design, adopt adaptive quantizing technology to quantize differential signal, can lower quantization level number, and then reduce transmission code rate; Adopt adaptive technique to adjust dynamically predictive coefficient, thereby ensure that fallout predictor is all the time in optimum prediction state.This method has been divided into former code check and two parts of high code check, on the basis of standard G.726, add high code check part, adaptive predictor quantization level number is improved to 4 bit, thereby provide prediction signal more accurately to former code check reconstruction signal counter, for reconstructed speech, thereby solve the G.726 poor problem of standard tonequality, obtain good tonequality; Output, from the adaptive quantizer of true form rate part, adopts the quantization level number of 2 bit, thereby keeps the output of 16Kbps code check; Adopt the Model Design multiplier of time-sharing multiplex, can save in this way bandwidth, make full use of storage space and the advantage that reaches trunk call tonequality, have a good application prospect in voice transfer and field of storage.
Brief description of the drawings
Fig. 1 is the structured flowchart of 16Kbps code check voice data compaction coding method of the present invention;
Fig. 2 is adaptive quantizer structured flowchart in 16Kbps code check voice data compaction coding method of the present invention;
Fig. 3 is contrary adaptive predictor structured flowchart in 16Kbps code check voice data compaction coding method of the present invention;
Fig. 4 is adaptive predictor and reconstruction signal calculator structure block diagram in 16Kbps code check voice data compaction coding method of the present invention;
Fig. 5 is the multiplexing structural drawing of multiplier in 16Kbps code check voice data compaction coding method of the present invention.
Embodiment
Below in conjunction with accompanying drawing, the invention will be further described.
Accompanying drawing 1 is a kind of structured flowchart of 16Kbps code check voice data compaction coding method, this method has been divided into high code check and two parts of low code check, high code check part adopt 4 bit quantization level produce more accurately prediction signal for reconstructed speech, and true form rate part adopts the quantization level number of 2 bit, ensure the output of 16Kbps code check.Wherein differential signal can be expressed as:,
, wherein,respectively input signal and prediction signal;
Quantization level can be expressed as:
, wherein, be scaling factor, this quantization level is on the one hand as the output of this method, and conduct is against the input of adaptive quantizer on the other hand;
, be wherein scaling factor, this quantization level is on the one hand as the output of this method, and conduct is against the input of adaptive quantizer on the other hand;
So the differential signal after quantification can be expressed as:
Prediction signal can be expressed as:
Wherein
In above formula, short-time average value can be expressed as:
When long, mean value can be expressed as:
Single-tone detection unit can be expressed as:
Transient sounds detecting unit can be expressed as:
Reconstruction signal can be expressed as:
Accompanying drawing 2 is adaptive quantizer structured flowcharts in a kind of 16Kbps code check voice data compaction coding method, and effect is that differential signal is quantized into adpcm code.Wherein LOG is transformed into differential signal log-domain from linear domain.First, calculate, exponential sum mantissa:
Then the mantissa of 7 of the exponential sums of 4 is combined:
The function of QUAN is the differential signal quantizing in log-domain.
SUBTB is the logarithmic form calibration to differential signal by reduction scaling factor.
Accompanying drawing 3 is contrary adaptive quantizer structured flowcharts in a kind of 16Kbps code check voice data compaction coding method, and its effect is that the output of adaptive quantizer is carried out to re-quantization, obtains the differential signal after quantizing.ADDA is added to scaling factor the logarithmic form of quantized difference signal.
ANTILOG is transformed into linear domain quantized difference signal from log-domain.First getsign bit:
Then calculate respectively the mantissa of 7 of the exponential sums of 4, and index be converted to linear format:
Finally, add sign bit, obtain the differential signal after quantizing:
RECONST rebuilds quantized difference signal in log-domain.
Accompanying drawing 4 is adaptive predictor and reconstruction signal calculator structure block diagrams in a kind of 16Kbps code check voice data compaction coding method, and it calculates the predicted value of voice signal according to the quantized difference signal of input.In figure, the first half is six rank systems at zero point, and wherein ADDC is for obtaining the sign bit after quantized difference signal and prediction signal addition at zero point.
Add sign bit expansion:
ADDB, according to prediction signal and quantized difference signal, draws reconstruction signal.
Add the expansion of sign bit:
FLOATB converts the two's complement of reconstruction signal to floating number.First calculate amplitude:
Then gauge index:
Finally calculate mantissa, and sign bit, exponential sum mantissa combined:
FLOATA is converted to floating number quantized difference signal.First calculate amplitude:
Then gauge index:
Finally calculate mantissa, and sign bit, exponential sum mantissa combined:
XOR is used for realizing the XOR of difference signal and differential delay signal code position.
TRIGB is fallout predictor trigger module:
UPB is used for calculating the predictor coefficient at six rank zero points:
FMULT is for realizing two multiplyings between floating number.
Gauge index and mantissa:
Floating-point format is divided into sign bit, exponential sum mantissa:
Carry out again floating-point multiplication:
In the second order pole system of the latter half, UPA1 and UPA2 have been used for the renewal of second order limit coefficient.Taking UPA1 as example:
LIMC completes the restriction to second order limit coefficient.
LIMD has been used for the restriction of second order limit coefficient.
First calculate higher limit:
Then calculate lower limit:
Predicted composition signal after ACCUM is added fallout predictor output.
Accompanying drawing 5 is to be multiplication module design frame chart in a kind of 16Kbps code check voice data compaction coding method, and in order to save area, the present invention has become Multiplier Design the mode of time-sharing multiplex.Signal count_FMULT is used for counting, and in the time counting down to 3, starts time-sharing multiplex multiplier, and time-sharing multiplex is after totally 8 times, and count_FMULT signal becomes 11, and prediction signal has been calculated.In this way, eight multipliers just can become one.
Above-mentioned example is only explanation technical conceive of the present invention and feature, and its object is to allow person skilled in the art can understand content of the present invention and implement according to this, can not limit the scope of the invention with this.All equivalent transformations that Spirit Essence does according to the present invention or modification, within all should being encompassed in protection scope of the present invention.