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.
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, quantizing factor 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 200 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.
In addition, the DRA audio frame structure after Fig. 1 C further shows and handles through the DRA audio coder comprises information 330, filling bit 340, and additional data 350 5 major parts of synchronization character 310, frame head information 320, every sound channel.
Hereinafter will be at first in conjunction with the DRA frame structure among Fig. 1 C, describe in detail according to bit error detection method in the frame of the embodiment of the invention.
For the correctness that detects certain code stream (that is, whether error code), must analyze from the frame structure characteristics of this kind code stream, to obtain necessary criterion.Specific to the DRA code stream, code stream is being divided on the basis of five most of 310-350, the information 330 of every sound channel can be subdivided into quantization step index 336 6 parts of window sequence 331, Huffman code book 332, quantizing factor 333, quantization step 334 and difference code switch 335 and combined strength coding.This six partial informations 331-336 and frame head information 320 are corresponding respectively with the technology modules shown in Figure 1A-Figure 1B, in a single day they produce error code, will directly have influence on the decoding of further part, therefore this paper is referred to as six part 331-336 and frame head information 320 " error code validity information ", and they may be can be used for judging the correctness of DRA code stream.Corresponding therewith, synchronization character 310, filling bit 340 and additional data 350 etc. can not be used to judge the correctness of DRA code stream, just do not belong to " error code validity information ".
Specifically, utilize " error code validity information " to judge whether code stream has misoperation method and corresponding error code concealment method (that is the method that the part that has error code is compensated) shown in hereinafter 1-6:
1, detection and the concealment method relevant with frame head information 320
According to the DRA standard, there is the parameter shown in hereinafter 1.1-1.10 in the frame head 320, they are directly packed and enter code stream, do not need to handle through huffman coding:
1.1nFrmHeadType:1bit
This parameter indication frame head type realizes that at present the value of this bit all is set to 0 in the device of DRA standard, so as to detect this parameter be that error code appears in 1 expression.If error code appears in this parameter, corresponding error code concealment method is: obtain the frame head type that the frame head type information replaces present frame from other frames.
1.2nNumWord:10bits
The data of this parameter indication present frame are 340 length that finish from synchronization character 310 to filling bit.If the length of present frame is different with the length of former frame, then error code appears in explanation, and its corresponding concealment method is for replacing the frame length of present frame with the frame length of former frame.
1.3nNumBlocksPerFrm:2bits
The piece number of the short window MDCT of this parameter indication, the transmission value of this parameter can only be 3 at present.If other values occur, all be considered as occurring error code.Corresponding error code concealment method is for 3 transmission values that are used as nNumBlocksPerFrm.
1.4nSampleRateIndex:4bits.
The index value of this parameter indication sampling rate, value is 0-12 at present, the value that 13-15 occurs is error code with regard to differentiating.If detect error code, then corresponding error code concealment method is the nSampleRateIndex that the value of obtaining nSampleRateIndex from other frames replaces present frame.
1.5nNumNormalCh:3bits
This parameter is indicated the number of normal sound channel, and its bit error detection method is to determine whether normal channel number actual in its indicated normal channel number and the code stream mates, as does not match, and then error code appears in explanation.If detect error code, then corresponding error code concealment method is the nNumNormalCh that the value of obtaining nNumNormalCh from other frames replaces present frame.
1.6nNumLfeCh:1bit
This parameter indication low frequency strengthens the number of (LFE) sound channel, and its bit error detection method is to determine whether LFE channel number actual in its indicated LFE channel number and the code stream mates, as does not match, and then error code appears in explanation.If detect error code, then corresponding error code concealment method is the nNumLfeCh that the value of obtaining nNumLfeCh from other frames replaces present frame.
1.7bUseSumDiff:1bit
This parameter indicates whether to use and differs from coding decision.When nNumNormalCh=1, this position should be 0, otherwise error code appears in expression.Corresponding error code concealment method is with bUseSumDiff zero setting.
1.8bUseJic:1bit
This parameter indicates whether to use the decision of combined strength coding.During nNumNormalCh=1, this position should be 0, otherwise error code appears in expression.Corresponding error code concealment method is with bUseJic zero setting.
1.9bAuxChCfg:1bit
This parameter indicates whether to exist auxiliary data, does not have relevant Error detection mechanism at present temporarily.
1.10nJicCb:5bit
Initial critical band during this parameter indication combined strength coding, effective when bUseJic=1; The determination methods of error code is whether the actual value of seeing this parameter representative surpasses its pairing critical band maximum possible value, if surpass then error code appears in expression.If error code, corresponding error code concealment method: the bUseJic that replaces present frame with the data b UseJic value of former frame.
2, detection and the concealment method relevant with window sequence information 331
2.1nWinTypeCurrent:4bits
The window type of this parameter indication MDCT conversion, its span is [0,8] (long window), perhaps [9,12] (short window) (probable value of nWinTypeCurrent and the corresponding relation of window shape see the following form 1, referring to DRA standard the 19th page table 16), the value that exceeds this scope will be judged as and have error code.
Table 1 window function index
?nWinTypeCurrent |
The window function title |
Window function length (sample number) |
?0 |
WIN_LONG_LONG2LONG |
2048 |
?1 |
WIN_LONG_LONG2SHORT |
2048 |
?2 |
WIN_LONG_SHORT2LONG |
2048 |
?3 |
WIN_LONG_SHORT2SHORT |
2048 |
?4 |
WIN_LONG_LONG2BRIEF |
2048 |
?5 |
WIN_LONG_BRIEF2LONG |
2048 |
?6 |
WIN_LONG_BRIEF2BRIEF |
2048 |
?7 |
WIN_LONG_SHORT2BRIEF |
2048 |
?8 |
WIN_LONG_BRIEF2SHORT |
2048 |
?9 |
WIN_SHORT_SHORT2SHORT |
256 |
?10 |
WIN_SHORT_SHORT2BRIEF |
256 |
?11 |
WIN_SHORT_BRIEF2BRIEF |
256 |
?12 |
WIN_SHORT_BRIEF2SHORT |
256 |
In addition, the window type of former frame and the window type of present frame being mated, also is the method that another kind judges whether to exist error code.Enumerated the transition between some typical window types among Fig. 2, Dui Ying determination methods is as follows with it:
When former frame was WIN_LONG_LONG2LONG, present frame should be WIN_LONG_LONG2SHORT or WIN_LONG_LONG2BRIEF, if other window types appear in the window type of present frame, then was judged as error code;
When former frame was WIN_LONG_LONG2SHORT, present frame should be WIN_LONG_SHORT2BRIEF, WIN_SHORT_SHORT2BRIEF or WIN_SHORT_SHORT2SHORT, if other window types appear in the window type of present frame, then was judged as error code;
When former frame was WIN_LONG SHORT2LONG, present frame should be WIN_LONG_LONG2LONG, WIN_LONG_LONG2SHORT or WIN_LONG_LONG2BRIEF, if other window types appear in the window type of present frame, then was judged as error code;
When former frame is WIN_LONG_LONG2BRIEF, present frame should be WIN_LONG_BRIEF2BRIEF, WIN_LONG_BRIEF2SHORT, WIN_SHORT_BRIEF2BRIEF or WIN_SHORT_BRIEF2SHORT, if other window types appear in the window type of present frame, then be judged as error code;
When former frame was WIN_LONG_BRIEF2LONG, present frame should be WIN_LONG_LONG2LONG, WIN_LONG_LONG2SHORT or WIN_LONG_LONG2BRIEF, if other window types appear in the window type of present frame, then was judged as error code;
When former frame was WIN_LONG_BRIEF2BRIEF, present frame should be WIN_LONG_BRIEF2SHORT, WIN_SHORT_BRIEF2SHORT or WIN_SHORT_BRIEF2BRIEF, if other window types appear in the window type of present frame, then was judged as error code;
When former frame was WIN_LONG_SHORT2SHORT, present frame should be WIN_SHORT_SHORT2SHORT, WIN_LONG_SHORT2BRIEF or WIN_SHORT_SHORT2BRIEF, if other window types appear in the window type of present frame, then was judged as error code;
When former frame was WIN_LONG_BRIEF2SHORT, present frame should be WIN_SHORT_SHORT2SHORT, WIN_LONG_SHORT2BRIEF or WIN_SHORT_SHORT2BRIEF, if other window types appear in the window type of present frame, then was judged as error code;
When former frame was WIN_SHORT_SHORT2SHORT, present frame should be WIN_LONG_SHORT2LONG, WIN_LONG_SHORT2SHORT or WIN_LONG_SHORT2BRIEF, if other window types appear in the window type of present frame, then was judged as error code;
When former frame was WIN_SHORT_SHORT2BRIEF, present frame should be WIN_LONG_BRIEF2LONG, WIN_LONG_BRIEF2SHORT or WIN_LONG_BRIEF2BRIEF, if other window types appear in the window type of present frame, then was judged as error code;
When former frame was WIN_SHORT_BRIEF2SHOR, present frame should be WIN_LONG_SHORT2LONG, WIN_LONG_SHORT2SHORT or WIN_LONG_SHORT2BRIEF, if other window types appear in the window type of present frame, then was judged as error code;
When former frame was WIN_SHORT_BRIEF2BRIEF, present frame should be WIN_LONG_BRIEF2LONG, WIN_LONG_BRIEF2SHORT or WIN_LONG_BRIEF2BRIEF, if other window types appear in the window type of present frame, then was judged as error code.
2.2nNumCluster:2bits
The number of the cluster that this parameter present frame is divided (that is, the transition segment in the DRA standard refers to the set of the piecemeal that one or more statistical properties are close in the frame).Its span goes beyond the scope and then thinks error code (that is, the number of transition segment can not be 3) between [0,2]; If the window type of present frame is long window, nNumCluster is 0 so, if other values judge error code to occur that corresponding error code concealment method is: directly it is changed to 0; If the window type of present frame is for short window,, then is judged to be and error code occurs in case nNumCluster is 0.
2.3nNumBlocksPerFrm[nCluster-1]
This parameter is indicated the piece number of the short-and-medium MDCT of each cluster, is obtained by the huffman decoding.
3, detection and the concealment method relevant with the huffman code book
3.1anHSNumBands[nCluster]:5bits
This parameter is indicated the number of the code book section of nCluster transition segment, and span is [0,23], if surpass this scope, then is judged to be error code.
3.2mnHSBandEdge[anHSNumBands]
The range of application of this parameter indication huffman code book section, its size should satisfy: mnHSBandEdge[anHSNumBands] * 4 is less than 128*nNumBlocksPerFrm[nCluster] (situation of short window), or less than 1024 (situations of long window).Otherwise, be judged to be error code.
3.3mnHS[anHSNumBands]
The huffman sign indicating number book number of the corresponding Band of this parameter, corresponding sign indicating number book number should exceed this scope and be judged to be error code between [0,9].
4, detection and the concealment method relevant with quantizing factor and quantization step
4.1anQIndex[nBin]
The quantizing factor of this parametric representation nBin sub-band samples is obtained by the Huffman decoding, if contain error code in this parameter, generally can continue decoding, but can influence the quality of rebuilding audio frequency.
4.2mnQStepIndex[nCluster][nBand]
(nCluster, quantization step index nBand) are obtained by the Huffman decoding this parametric representation quantifying unit, if its value scope is 0-115 (participating in the DRA standard scale B.1), the value that exceeds this scope will be judged as error code.
Further, when this parameter error code appears but its wrong decode value less than 116 the time, generally can not influence subsequent decoding, because still can B.1 find the corresponding quantization step-length by the DRA standard scale, but quantization step value that should mistake can influence the audio quality that decoding is come out., hereinafter will be described in more detail less than the error code under 116 situations for the quantization step index in conjunction with Fig. 5.
5, with and difference code switch relevant detection and concealment method
Pass through mnSumDffOn[nCluster] [nBand] judge corresponding quantifying unit (nCluster, nBand) whether adopt and differ from coding, this partial parameters is a kind of special circumstances, at present can't be at checking the mechanism that whether has error code in the frame with the difference code switch.
Relevant detection and the concealment method mnJicStepIndexp[nCluster of quantization step during 6, with use combined strength coding] when the combined strength coding is used in [nBand] expression, quantifying unit (nCluster, nBand) the quantization step index of pairing spectral coefficient, obtain by the Huffman decoding, if its value is considered as error code more than or equal to 116.
Further, when this parameter error code appears but its wrong decode value less than 116 the time, generally can not influence subsequent decoding, because still can B.1 find the corresponding quantization step-length by the DRA standard scale, but quantization step value that should mistake can influence the audio quality that decoding is come out., hereinafter will be described in more detail less than the error code under 116 situations for the quantization step index in conjunction with Fig. 5.
Above divide six aspects to introduce and how to detect whether there is error code in the DRA frame, and some error conditions have been provided comparatively simple, direct error code concealment method.To be introduced at Error detection-concealment method in the DRA frame that provides among Fig. 3-6 below, be gone back content in the narration with reference to Fig. 1-2.
On the whole,, need be analyzed, be found out the error code concealing technology that meets its characteristics from the frame structure of DRA itself in order to provide detection-concealment method for error code in the DRA frame.
General DRA bit error detection method and Error detection-concealment method 10 have been shown among Fig. 3.By the step among Fig. 3 as can be known DRA Error detection-concealment method be divided into three kinds of situations: (1) error code occurs for some special parameters, can adopt the method that directly substitutes with the former frame relevant parameter to carry out hidden processing (concrete alternative method is hereinbefore in conjunction with detailed narration has been carried out in the discussion of " error code validity information "); (2) for detected error code in window sequence, huffman code book, quantization step and these modules of quantizing factor, then may carry out hidden processing (as "Yes" in the parameter error code determination step 14): the data of this error code frame former frame of buffer memory in the mode of frequency domain interpolation, withdraw from then, continue the data of decoding error code frame next frame, at the next frame data judging is under the situation of no error code, data to two frames are carried out interpolation at frequency domain, and this method will be explained in more detail hereinafter; (3) can not be for some by judging that parameter that the parameter magnitude range detects error code (for example, " the quantization step index is less than the error code under 116 situations " above mentioned), then amplitude determining step 19 can be set behind IMDCT 18, in this step the data in the time domain being carried out amplitude judges, if satisfy some criterion (hereinafter will describe in detail), show that so there is error code in this decoded frame, after the frequency domain of next frame carries out hidden processing, export again; Otherwise illustrating does not have error code, directly exports the PCM data.Error detection and the detection-concealment method judged based on amplitude in the step 19 will be explained in more detail in conjunction with Fig. 5 hereinafter.
Owing to above carrying out comparatively detailed explanation based on the Error detection-concealment method that directly substitutes under (1) the kind situation, therefore hereinafter will repeat no more about the discussion of " error code validity information ".Hereinafter will describe (2) above-mentioned kind situation and the Error detection-hidden disposal route under (3) the kind situation respectively in detail.
At first specify the processing mode of above-mentioned second kind of situation in conjunction with Fig. 4, when promptly there is error code in the parameter in judging these several modules of window sequence information, huffman code book, quantizing factor or quantization step, will withdraw from the decoding ("Yes" in the corresponding step 24) of present frame, and then read in (step 30) and decoding (step 31-33) next frame data, and the data of buffer memory former frame standby (step 30 ').Do not have under the situation of error code ("No" in the corresponding step 34) at next frame, utilize step 30 ' in store and step 31-33 in the data of front and back that decode, the error code frame two frames in step 36, carry out frequency domain interpolation, obtain the estimated value of current error code frame data, send into IMDCT 28 as the actual output of current error code frame with it; Also be judged as under the situation of error code ("Yes" in the corresponding step 34) at next frame, the data of the former frame of attenuation processing error code frame in module 35, and with the actual output as the error code frame send into IMDCT 28.
Hereinafter as shown in Figure 4, may exist the frame of error code to be embodied as n frame (n>1).Then above-mentioned DRA Error detection-concealment method based on frequency domain interpolation or attenuation processing is embodied in: when detecting the n frame parameter have error code in step 24, just in step 30 ' in buffer memory (n-1) frame data and in step 30, read in the data of (n+1) frame of coding; Subsequently, if in step 34, the relevant parameter of decoded (n+1) frame data is detected as no error code ("No" in the corresponding step 34), to enter into step 35,35 ' so, reach 36, (n-1) frame and (n+1) frame data of preserving are carried out frequency domain interpolation, the real output value of the result of interpolation, carry out subsequent operation IMDCT 28 then as the n frame data; If detecting, (n+1) frame parameter has error code ("Yes" in the step 34), to enter step 37 so, in this step with step 30 ' in (n-1) frame data of buffer memory multiply by attenuation coefficient α, the result of gained is as the estimated value of n frame data, and with as input to IMDCT 28.
Hereinafter for convenience, the processing of step 30-36 correspondence is called " frequency domain interpolation method ", be used to indicate according to the embodiment of the invention, come interpolation to estimate at the current frame data of error code based on the former frame and back one frame data of no error code, and be used as the actual output of present frame with this estimated value.And further the processing with step 30-37 correspondence is called " frequency domain interpolation or damped system ".
It will be appreciated by persons skilled in the art that the committed step in the frequency domain interpolation method is a frequency domain interpolation step 36, wherein used interpolation is linear interpolation preferably; More preferably, the ratio that is used for the coefficient of (n-1) frame and (n+1) frame data linear interpolation equals the ratio of (n-1) frame and (n+1) frame energy, and the coefficient sum that is used for (n-1) frame and (n+1) frame data interpolation is 1.Those skilled in the art by read instructions of the present invention will also be appreciated that in the step 37 in " frequency domain interpolation or damped system " adopt the codomain of attenuation coefficient α to be [0,1], preferably between 0.3-0.8, more preferably 0.5.
When the error code in the DRA code stream appears in quantizing factor 333 or quantization step 334 parameters, might the huffman decoding can not report an error ((3) kind situation As mentioned above), can continue decoding.But the existence of this error code can directly have influence on the decode quantizing factor that comes out, the value of quantization step, particularly when error code appears in the quantization step parameter, can directly resulting audio frequency spectral line value be expanded many times, greatly influence the accuracy of quantifying unit acoustic energy, caused final output harsh noise to occur.For this reason, as shown in Figure 5, provide particular detection method and detection-concealment method according to yet another embodiment of the invention, that error condition above-mentioned module occurred:
The quantization step Error detection of frequency domain and processing (corresponding to the judgement "Yes" of step 44 and processing subsequently):
Consider at first that in frequency domain the quantization step that decoding is come out detects.By signature analysis, judge the correctness of quantization step to quantization step:
The quantization step that each audio frame that adds behind the random error decodes is out analyzed, can be obtained the quantization step parameter and exist the criterion of error code as follows: be judged to be when (a) there is very big jump in each quantifying unit corresponding quantitative step sizes and have error code; Or the value of the quantization step index that (b) decodes is judged to be more for a long time greater than 100 number of times and has error code.Specifically, in step 44, can whether surpass predetermined threshold β (difference of each quantifying unit correspondence quantization step index surpasses β and then is judged to be error code) by the difference of judging each quantifying unit correspondence quantization step index in the frame, and/or by judging whether the quantization step index value judges above threshold gamma (the quantization step index value surpasses 100 number of times and then judges error code above γ) whether this parameter exists error code above 100 number of times.Preferably, β is between 10-20, and γ is between 5-10.
Therefore, jumping characteristic by analyzing each quantifying unit quantization step and statistic quantification step-length can determine substantially greater than 100 number whether this frame quantization step error code occurs.When error code occurring (corresponding to the "Yes" in the step 44), " frequency domain interpolation or the damped system " that can describe by preamble is to the in addition hidden processing of error code frame, and this has been described in detail in conjunction with Fig. 4 hereinbefore, does not repeat them here.
Above-mentioned frequency-domain error detects and Error detection-concealment method has little, the low advantage of processing complexity of delaying time, but also exists the low shortcoming of accuracy aspect Error detection.For this reason, the present invention also provides another kind of bit error detection method based on the time domain quantization step.
The quantization step Error detection of time domain and processing (corresponding to the judgement of step 49):
Specifically, (amplitude limit value of 16 precision correspondences is 32767 if the numerical value that obtains in the IMDCT of step 48 place decoding surpasses certain (being preferably 1.2) multiple of amplitude limit value, the amplitude limit value of 24 precision correspondences is 8388606) number of times greater than certain positive integer k (preferably between 8-12, more preferably 10), just judge that these frame data resulting quantization step in decode procedure is wrong at step 49 place.Otherwise, in step 49, there is not error code as being judged to be, then directly export the PCM data as final output.
For in step 49, being judged to be the situation that has error code, will continue in frequency domain, to carry out the hidden processing of error code, this disposal route and previously described " frequency domain interpolation or damped system " complete class are not described in detail in this together.But what pay particular attention to is, Fig. 5 step 54 what be chosen as mark among of "Yes" is " Fade-out (fading out) ", and be not the attenuation processing of step 37 among similar Fig. 4.Such mark is in order to show emphatically: the processing mode of the former frame of decay error code frame (for example in " frequency domain interpolation or damped system " as herein described, processing in the step 37) actual is a kind of special circumstances in multiframe Error detection-concealment method of handling based on fade-out, muting, fade-in of hereinafter describing subsequently: promptly, it is exactly the processing mode of former frame of error code frame of decaying in " frequency domain interpolation or damped system " that the fade-out that is adopted at the first frame error code frame that continuous error code occurs handles.
Time domain detects and compares with frequency domain detection, and its advantage is that the accuracy of Error detection is than higher; Shortcoming then is that time delay is big and the processing complexity is higher.
To Error detection and detection-concealment method in the DRA frame according to yet another embodiment of the invention be described in conjunction with Fig. 6 hereinafter---based on the multiframe Error detection-concealment method 60 of fade-out, muting, fade-in processing.These class methods especially at be error code frame number greater than 1 situation, under this kind situation, be unsuitable for adopting interpolation method to carry out hidden processing.Specifically, if certain parameter of present frame is detected as error code, then withdraw from the decoding of present frame; And then decoding when next frame error code occurs again, is defined as multiframe and makes mistakes during next frame; It is hidden just can not to continue to adopt this moment the method for frequency domain interpolation to carry out error code.
According to one embodiment of present invention, need in such cases:
The decoded data of immediate no error code frame before the continuous error code frame of buffer memory, and these data be multiply by a certain sorrow (for example subtract coefficient, α), be used as the actual output of first error code frame of makeing mistakes with the new data that generates, as previously mentioned, Ci Shi disposal route is exactly the processing mode of the former frame of decay error code frame in " frequency domain interpolation or damped system "; Reduce attenuation coefficient successively, and immediate no error code frame data before the continuous error code frame are decayed with ever-reduced attenuation coefficient, and with the data after the decay as the actual output of follow-up each error code frame, what is called that Here it is the basic thought that (fade-out) handles that fades out.
When the error code frame number surpasses a certain preset value, adopt quiet processing (muting), be about to current processed frame zero setting, with quiet output as present frame.
When the DRA frame of transmission recovers normally (no error code) first, take out the correct frame data that occur first, multiply by corresponding attenuation coefficient with these data, and the actual output of the correct frame data that are used as occurring first with this product, Here it is basic thought that so-called fading in (fade-in) handle.
The specific implementation of said method is as shown in Figure 6:
1) when in code stream, detecting first the error code frame 63 that occurs when (as, N frame), the data of buffer memory (N-1) frame 61;
2) (N+1) frame 65 of decoding then, if (N+1) frame data also are judged as error code in the process of decoding, copy the data 62 of (N-1) frame of buffer memory so, and it be multiply by an attenuation coefficient α, the gained result continues follow-up operation as the actual output of N frame data; Otherwise, if (N+1) frame data are not judged as error code in the process of decoding, then carry out " frequency domain interpolation method " mentioned above with N-1 frame and N+1 frame data, the data output by the result of frequency domain interpolation substitutes the N frame continues follow-up operation.
How to realize in order to illustrate that more typically fade-out handles herein, suppose that N-(N+5) frame all is judged as error code.That is, when handling the N frame, all the time in step 2 to the N+4 frame) in first kind of situation occurring.
3) continue to occur error code when (N+2) frame, just the data 64 with (N-1) frame of buffer memory multiply by attenuation coefficient α
2, the result of gained replaces (N+1) frame 65 of error code as actual output;
4) by that analogy, when error code (2<x<6) appears in (N+x) frame, just continue to multiply by attenuation coefficient α with the data of (N-1) frame of buffer memory
λ, the result of gained is used as the actual output of (N+x-1) frame of error code;
Express for convenience above-mentioned steps 2)-4) be referred to as " multiframe Error detection-concealment method of handling based on fade-out " in the present invention.
5) if the error code frame number surpasses 5 frames, so since (N+5) frame 67, with the equal zero setting of error code frame that occurs continuously afterwards, quiet output.
Express for convenience above-mentioned steps 5) be referred to as " multiframe Error detection-concealment method of handling based on muting " in the present invention.
6) to occur recovering first behind the error code frame of normal (that is no error code) continuously be N+m frame 69 in supposition.At this moment, the decoded data of (N+m) frame 69 be multiply by attenuation coefficient α corresponding when fade-out handles before
5After, as the actual output of (N+m) frame data.
7) next decode and judge next frame: if error code has appearred again in the N+m+1 frame, then by judge the N+m+2 frame whether error code to decide be also to be based on the actual output that multiframe Error detection-concealment method that fade-out handles draws the N+m+1 frame data by frequency domain interpolation.What pay particular attention to is, if adopt frequency domain interpolation to handle, then (N+m) frame data need adopt its actual output (i.e. (N+m) frame * α
5); Otherwise,, then adopt the decoded data of (N+m+1) frame to multiply by and corresponding before attenuation coefficient α if the N+m+1 frame still keeps not having error code
4After, as the actual output of (N+m+1) frame data.
In order to illustrate how the fade-in effect realizes, suppose that in an embodiment of the present invention (N+m)-(N+m+4) frame all is judged as no error code.That is, second kind of situation of step 7) appears in (N+m)-(N+m+4) frame all the time.
8) by that analogy, when (N+m+y) frame did not have error code (1<y<5), just continuation be multiply by attenuation coefficient α with the data of (N+m+y) frame of buffer memory
5-y, the result of gained is used as the actual output of (N+m+y) frame.
Express for convenience above-mentioned steps 6)-8) be referred to as " multiframe Error detection-concealment method of handling based on fade-in " in the present invention.
Beneficial effect of the present invention
Table 2 show according to the embodiment of the invention DRA Error detection-concealment method (overall treatment) and directly with the comparative result between the quiet alternative method, test condition is the DRA code stream of bit error rate 1e-5.The employed objective examination's software of result is EAQUAL in the table 2 in order to draw, and 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.Test code streams is 12 used section audio fragments of mpeg audio test, is two-channel, and 48kHz, compression bit rate are 128kbps, and the bit error rate is 1e-5.
Table 2 overall treatment and ODG contrast in quiet alternative objective minute
Test code streams |
Overall treatment |
Quiet substituting |
es01 |
-0.85 |
-1.28 |
es02 |
-0.48 |
-0.42 |
es03 |
-0.86 |
-0.79 |
sc01 |
-1.54 |
-1.84 |
sc02 |
-0.91 |
-1.20 |
sc03 |
-0.68 |
-0.70 |
sm01 |
-0.63 |
-0.91 |
sm02 |
-2.30 |
-2.53 |
sm03 |
-3.85 |
-3.83 |
si01 |
-0.61 |
-1.05 |
si02 |
-0.94 |
-0.95 |
si03 |
-2.05 |
-2.72 |
Mean value |
-1.30 |
-1.52 |
As can be seen from the table for transient signal, such as sm02 and si02, use according to the embodiment of the invention DRA Error detection-concealment method can improve the hidden quality of error code greatly.According to analysis result as can be seen, for the code stream of music class, adopt according to the embodiment of the invention DRA Error detection-concealment method, the hidden effect of error code than quiet substitute far better; For the voice class code stream, effect is also more satisfactory.
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.