1. Field of the Invention
The present invention relates to the recovery of lost or damaged encoded data. More particularly, the present invention relates to the minimizing of quality degradation caused by error propagation in bitstreams containing lost or damaged encoded data.
2. Art Background
It is quite common to compress data to minimize transmission or storage bandwidth requirements. One type of compression process is referred to as variable length coding. In variable length coding processes, the signal is typically divided into several localized regions, also referred to as blocks, and is coded by quantizing each region according to its signal activity level. In an exemplary signal such as signals representative of digital images, different parts of the images have different activity levels and are therefore coded with a different number of quantization bits.
The information regarding the number of quantization bits used for coding different regions is used by the decoder to delineate the respective quantization bits of each block from the received bitstream, which in turn is used to decode the blocks. Therefore, when the information regarding the number of quantization bits used to encode data is lost, a recovery process is implemented to estimate the number of quantization bits used to generate the codes representative of the data. If the number of quantization bits is not accurately estimated, the error incurred will propagate through the bitstream as the decoder is unable to determine the location of the end of one block, and therefore the beginning of the next block.
One type of variable length encoding is known as Adaptive Dynamic Range Coding (ADRC). For further information regarding ADRC, see, “Adaptive Dynamic Range Coding Scheme for Future HDTV Digital VTR”, Kondo, Fujimori, Nakaya, Fourth International Workshop on HDTV and Beyond, Sep. 4–6, 1991, Turin, Italy.
In one example of ADRC, blocks are encoded using a minimum pixel value (MIN), the dynamic range (DR) of pixel values in the block, the motion flag (MF) indicative of temporal activity and the quantization codes (Q codes) representative of each pixel in a block. The Q codes are generated based upon a minimum value, quantization step and the original pixel value. The quantization step is determined by the DR of the block and the number of quantization bits (Qbit), wherein the Qbit is a function of DR.
When the encoded bits are received in the decoder, the Qbit and MF information of each block is needed to delineate the portion of the bitstream corresponding to each block, and in turn to decode the block. If the DR and/or MF of the block is damaged, it is necessary to recover or estimate the information in order that the blocks can be decoded. At the same time, in case of a recovery failure, this error will likely result in incorrect decoding of the rest of the blocks and, in turn, severe picture degradation, since the starting point of subsequent blocks in the bitstream will be incorrectly identified.
The present invention provides a mechanism for preventing quality degradation of decoded data during the decoding of encoded data. In one embodiment, error propagation is detected and corresponding data is flagged. An error recovery process is then applied to the flagged data. In an alternate embodiment, hypotheses are calculated for lost/damaged data. A score distribution is used for detection of the false hypotheses. The data are flagged if their score distribution is within a range defined by a threshold and an error recovery process is applied to recover those data having associated error flags set.
The objects, features and advantages of the present invention will be apparent to one skilled in the art in light of the following description in which:
a illustrates one embodiment of a system of the present invention,
In the following description, for purposes of explanation, numerous details are set forth in order to provide a thorough understanding of the present invention. However, it will be apparent to one skilled in the art that these specific details are not required in order to practice the present invention. In other instances, well known electrical structures and circuits are shown in block diagram form in order not to obscure the present invention unnecessarily.
The system and method of the present invention provides an innovative mechanism for preventing quality degradation caused by error propagation in variable length encoded data. The discussion herein is directed to the recovery of image data, and in particular, Adaptive Dynamic Range Coding (ADRC). However, the invention is not limited to image data and can be applied to other types of correlated data including audio data. Furthermore, the present invention is not limited to ADRC; other variable length encoding processes may also be used. For example, the present invention is applicable to coding processes using Discrete Cosine Transform (DCT). In one embodiment, DCT coefficients of individual blocks can be quantized based upon respective activity levels, and the quantized coefficients are transmitted.
One embodiment of a system that operates in accordance with the teachings of the present invention is illustrated in
The scores and error flags corresponding to data decoded using the selected hypothesis is input to error propagation detection circuit 20. As will be discussed below, error propagation detection circuit 20 evaluates hypotheses to generate hypotheses results used to detect error propagation. In one embodiment, circuit 20 examines the score distribution and detects error propagation due to false candidate decoding. Other evaluation techniques may be used, including evaluation of score distribution patterns or other metrics. Pixel error recovery block 40, receives the decoded data error flags as well as flags that may have been generated by the error propagation detection circuit 20 to indicate that pixel error recovery is warranted and performs a pixel error recovery process to recover pixel data that may not be correct due to error propagation.
An alternate embodiment is illustrated in
In one embodiment, the memory can store instructions, which when executed by processing system 50, perform the methods described herein. Alternately, the instructions may be stored on other storage media or transmitted across a transmission media, such as a network, to the processor 55. Memory 60 can also be configured to store data used and generated as described herein.
Input/output circuitry 65, receives the encoded data, error flags and image data for processing by processing system 50 and outputs the recovered data generated.
An alternate embodiment is illustrated by
Pixel error flag circuit 80 receives flags indicating the pixel data which may contain errors. Typically, the flags are generated using known Error Correction Code (ECC) techniques.
Pixel error recovery circuit 78 receives input from prevent degradation circuit 76 and pixel error flag circuit 80 and performs a pixel error recovery process data for having corresponding error flags set. A pixel error recovery process, such as the classified adaptive error recovery process discussed below, may be used.
A more detailed block diagram of one embodiment of the Qbit and Motion Flag recovery circuit is shown in
An error measure is generated for each hypothesis. In one embodiment, an error measure may be determined based upon how well the candidate decoding fits into with other decoded data. For example, the measure may show how well correlated the candidate decoding is with other decoded data. Linear error, square error and Laplacian measurements may also be used.
One measure that can be used is square error measurements on decoded data. In one embodiment, the decoded domain square error measurement can be obtained using the following formula:
where yi′ represents the i-th decoded pixel value of the block being recovered for the hypothesis HypNo. and yj represents one of the neighboring decoded pixel values of the i-th pixel, R(i) represents a set of neighboring pixels to the i-th pixel and
where DR is the recovered dynamic range value, qi is the i-th Q code and Q is the Qbit number corresponding to the hypothesis HypNo.
In one embodiment, the data in the encoded domain is evaluated with respect to each hypothesis to generate corresponding error measures. For example, a linear error measure may be determined from encoded data as follows:
where q1i represents the Q code of the i-th pixel of the block being recovered (block 1), q2j represents the Q code of a neighboring pixel of the i-th pixel of a neighboring block (block 2), N is the number of neighboring-pair relations, Q1 and Q2 respectively represent the hypothesized Qbit number of the block being recovered and the Qbit number of the neighboring block. R(i) represents the neighboring pixels with respect to the i-th pixel of the block being recovered, and a1i and a2j represent a rescaled value of a2j. The function adj( ) as defined above performs a Q code resealing process to normalize the values for more accurate measurements.
Referring back to
where m(i, j) represents the j-th measurement for hypothesis i for the block or block group (e.g., 3 blocks which form a group), min(j) is the minimum of the j-th measurement among different hypotheses, and G is an identity function or a monotonically increasing function, depending on the application. G may be selected to be a function that increases the sensitivity of the scoring such that incorrect hypotheses will be clearly distinguishable from the correct hypothesis. For example, a square or linear function may be used. Alternately, G may be a constant, including one having a value of unity.
Alternately, if an accumulation function of, for example, linear error measures, is performed to produce a score, the score would be determined as follows:
In this example if the measure is linear error, the hypothesis with the lowest score is determined as the best score. However, it should be realized that the optimal choice can depend on the type of measure, application and compression algorithm used.
Referring back to
As noted earlier, if the hypothesis chosen is not correct, subsequent blocks of data will also be incorrectly decoded. This is illustrated with respect to
In one embodiment, image 505 shows a plurality of pixels, e.g., 510, 511, 514, 516, 518 which are encoded to produce an encoded bitstream 520. If, for example, block i is incorrectly decoded such that the length of the Q codes is not accurate, the error will propagate to subsequent blocks, e.g., blocks i+1, i+2, etc., as the starting points of the subsequent blocks are not correctly identified. As an illustration, bitstream 520 illustrates the correct start point 550 for block i and incorrect start point 555 for block i+1.
Whenever the selected hypothesis is wrong, scores are very similar among hypotheses. The threshold point can be selected such that all incorrect recovery results are surely detected. Typically, such a threshold also results in a few false alarms, i.e., some correct recovery results are detected as incorrect (shown as the shaded area in
The thresholds can be empirically determined for a particular application using known data. For example, for 4 bit ADRC encoding, the threshold may be set to approximately a value of 120.
In one embodiment, score distributions in successive recoveries are used to reinforce the error detection decision. Given that the current hypothesis is correct, the recovery start point of a next block or group of blocks in the bitstream is also correct. If the start point is correct, hypotheses for subsequent blocks or groups of blocks will generate pixels that exhibit highly correlated properties with respect to neighboring blocks resulting in large score distributions. If the start point is incorrect, hypotheses for subsequent blocks or group of blocks will generate pixels that are uncorrelated with the neighboring pixels resulting in uncorrelated score distributions.
The score distributions previously computed can therefore be used to flag propagation errors. For example, referring to
The likelihood that the hypothesis with the best score is correct may be indicated by the score distribution sd(i) among hypotheses. The score distribution can be measured in terms of statistics of various order, including standard deviation, average, median, difference of best score and second best score, difference of best score and average of best scores, etc. A score distribution may be chosen so that the score distribution curve for the correct recovery is completely non-overlapping with the score distribution curve for incorrect recovery.
A measurement criterion can be chosen that is highly sensitive to scoring variation among hypothesis. The optimal choice depends on the measurement and scoring techniques used in conjunction with the parameter, i.e., Qbit and Motion Flag, recovery technique as well as the type of data, for example, audio or video.
For example, if linear error measurements are used in conjunction with simple accumulation based scoring of the linear error measurements, the difference between the best and second best linear error scores may be used as a metric for score distribution. Thus, continuing with the present example, the score distribution for the i-th block or group can be measured as sd(i)=score(second best)−score(best), where score(best) represents the score for the contemplated best hypothesis, and score(second best) represents the score for the contemplated second best hypothesis.
The likelihood that a chosen hypothesis is correct may also be determined based on a compatibility measurement. One embodiment of this concept may utilize the decoded domain square error measurement. Pixels belonging to a localized block are highly correlated with neighboring pixels, and as a result, the square error measurement may yield a low value, although in general, the higher the dynamic range, the higher the square error. However, for a given dynamic range, an incorrect hypothesis results in a much higher square error measurement than that resulting from a correct hypothesis. Thus, the ratio of square error measurement and dynamic range can be alternatively used in place of the score distribution measurement sd.
As noted earlier, the error detection process based on score distribution measurements sd(i) for a block or group i can be reinforced by combining the score distribution measurements of the successive blocks in the bitstream, e.g., i+1, i+2 . . . i+W. where W is a length of what is referred to herein as reinforcement window. In one embodiment when groups of 3 blocks are processed together, W may be equal to 2. Other values of W may be selected depending upon the application and performance desired.
Several schemes can be employed for combining successive score distribution measurements, including empirically weighted averaging within the reinforcement window, or simple addition of score distribution measurements within the window.
For example, if the combined score for unit i is:
the recovery result is detected as an incorrect one if the current score sd(i) is less than or equal to a threshold value ind-thr and comb_thr is a preset threshold value for multiple block units within the reinforcement window.
As noted earlier, the threshold values may be empirically determined. For example, the individual threshold may be a value of approximately 120, and the combined threshold may be a value of approximately 800 when W=2.
Alternately, a majority decision can be employed. For example, if:
is less than W/2, the recovery result is marked as an incorrect one. τ(j) is a constant or variable threshold within the reinforcement window. In one embodiment, τ(j) is a predetermined constant that increases in value according to the block number in the block sequence being examined. For example, for 3-block units, τ(0) may be approximately equal to 120, τ(1) may be approximately equal to 200 and τ(2) may be approximately equal to 300.
Other methods of combining the information of a plurality of blocks or groups of blocks can also be used.
At step 935, if the error flag, DetectErrorFlag, is set, then the score distribution is combined with a prior combined score distribution variable comb_sd, and a counter (j) is incremented, step 950. Thus the combined score distribution comb sd is generated for a predetermined number of blocks within the reinforcement window W.
The combined score distribution value is then compared to a combined threshold value comb_thr to determine whether subsequent blocks require pixel recovery as the error in a previous block has caused error propagation to occur in the subsequent blocks. At step 940, if an individual score distribution is within a range defined by the threshold value, e.g., does not exceed the individual threshold value, the error flag is set, step 945. Further, a sum of subsequent score distributions is generated and a counter maintained to sum up the score distributions for W blocks or groups of blocks within the reinforcement window, step 955.
Once the combined score distribution has been generated for the number of blocks within the reinforcement window, at step 960, the combined score distribution is compared to the combined threshold value comb_thr. If a combined score distribution is not within the range defined by the threshold value, e.g., exceeds or equals the combined threshold value, the error flag and counter are reset and the next block is examined, steps 965, 905. This is indicative of the fact that error propagation did not occur and pixel recovery is not required for those blocks. However, if the combined score distribution is within the range, e.g., less than the combined threshold, step 960, error propagation flags are set for remaining undecoded pixels, step 970. The error propagation flags are optionally combined with other error flags, step 974, and pixel error recovery processing is performed on the error flagged pixels, step 978.
One embodiment of the process is illustrated in
The embodiment set forth in
As noted above, once the error flags are set, whether due to error propagation or earlier error detection, a pixel recovery process is performed (e.g., steps 978
Classification with respect to a deteriorated input signal, e.g., a signal containing lost/damaged data, is performed according to the input signal characteristics. The correct adaptive filter is prepared for each class prior to error recovery processing. More than one classification method may optionally be used to create the plurality of classes. Created classes may include a motion class, an error class, a spatial activity class, or a spatial class.
Classified adaptive error recovery is the technology which utilizes classified adaptive filter processing. A correct classification with respect to the deteriorated input signal is performed according to the input signal characteristics. An adaptive filter is prepared for each class prior to error recovery processing. A plurality of classes is generated based upon characteristics of the data points. The data points are classified as belonging to one of the plurality of classes and assigned a corresponding signal class. An undeteriorated signal is output corresponding to the input signal in accordance with the input signal class ID. Block data may be generated from the plurality of data points.
A flow diagram of an embodiment is shown in
At step 1117, each classification regarding the deteriorated input signal is executed to generate a class ID. Some class taps are selected adaptively according to another class ID. Multiple classifications may be executed, such as motion classification, error classification, spatial activity classification and spatial classification.
The classification scheme can be defined during system design, where the classification scheme, the number of classes, and other specification are decided for the target data. The design stage may include, among others, considerations of system performance and hardware complexity.
At step 1119, multiple classification generates a multiple class ID with a plurality of class IDs which are generated by various classification at step 1117. At step 1121, filter taps are adaptively selected according to the multiple class ID which is generated at step 1119. At step 1123, the filter tap structure is adaptively expanded according to the multiple class ID which is generated at step 1119. The number of filter coefficients that may be stored can be reduced by allocating the same coefficient to multiple taps. This process is referred to as filter expansion. At step 1125, filtering with respect to the deteriorated input signal is executed to generate an undeteriorated signal. Filter coefficients are selected adaptively according to the multiple class ID which is generated in step 1119.
For further information regarding classified adaptive error recovery, see U.S. patent application Ser. No. 6,307,979 titled “Classified Adaptive Error Recovery Method and Apparatus”, filed concurrently herewith, and is herewith incorporated by reference.
Although the present invention is discussed with respect to image data, the present invention may be used with any form of correlated data, including without limitation photographs or other two-dimensional static images, holograms, or other three-dimensional static images, video or other two-dimensional moving images, three-dimensional moving images, a monaural sound stream, or sound separated into a number of spatially related streams, such as stereo.
An example of audio signal 1201 is monitored at one or more time points t0–t8. The level of audio signal 1201 at time points t0–t8 is given by tap points X0–X8. The dynamic range of the audio signal 1201 is given as the difference between the lowest level tap point X0 and the highest level tap point X4. In addition to dynamic range, the standard deviation, the Laplacian value or the spatial gradient value can be introduced for spatial activity classification.
The invention has been described in conjunction with the preferred embodiment. It is evident that numerous alternatives, modifications, variations and uses will be apparent to those skilled in the art in light of the foregoing description.
Number | Name | Date | Kind |
---|---|---|---|
3311879 | Daher | Mar 1967 | A |
3665396 | Forney Jr. | May 1972 | A |
3805232 | Allen | Apr 1974 | A |
4361853 | Remy et al. | Nov 1982 | A |
4381519 | Wilkinson et al. | Apr 1983 | A |
4419693 | Wilkinson | Dec 1983 | A |
4532628 | Matthews | Jul 1985 | A |
4574393 | Blackwell et al. | Mar 1986 | A |
4703351 | Kondo | Oct 1987 | A |
4703352 | Kondo | Oct 1987 | A |
4710811 | Kondo | Dec 1987 | A |
4722003 | Kondo | Jan 1988 | A |
4729021 | Kondo | Mar 1988 | A |
4772947 | Kono | Sep 1988 | A |
4788589 | Kondo | Nov 1988 | A |
4815078 | Shimura | Mar 1989 | A |
4845560 | Kondo et al. | Jul 1989 | A |
4890161 | Kondo | Dec 1989 | A |
4924310 | von Brandt | May 1990 | A |
4953023 | Kondo | Aug 1990 | A |
4975915 | Sako et al. | Dec 1990 | A |
5023710 | Kondo et al. | Jun 1991 | A |
5086489 | Shimura | Feb 1992 | A |
5093872 | Tutt | Mar 1992 | A |
5101446 | Resnikoff et al. | Mar 1992 | A |
5122873 | Golin | Jun 1992 | A |
5134479 | Ohishi | Jul 1992 | A |
5142537 | Kutner et al. | Aug 1992 | A |
5150210 | Hoshi et al. | Sep 1992 | A |
5159452 | Kinoshita | Oct 1992 | A |
5166987 | Kageyama | Nov 1992 | A |
5177797 | Takenaka et al. | Jan 1993 | A |
5185746 | Tanaka et al. | Feb 1993 | A |
5196931 | Kondo | Mar 1993 | A |
5208816 | Seshardi et al. | May 1993 | A |
5237424 | Nishino et al. | Aug 1993 | A |
5241381 | Kondo | Aug 1993 | A |
5243428 | Challapali et al. | Sep 1993 | A |
5258835 | Kato | Nov 1993 | A |
5301018 | Smidth et al. | Apr 1994 | A |
5307175 | Seachman | Apr 1994 | A |
5321748 | Zeidler et al. | Jun 1994 | A |
5327502 | Katata et al. | Jul 1994 | A |
5337087 | Mishima | Aug 1994 | A |
5359694 | Concordel | Oct 1994 | A |
5379072 | Kondo | Jan 1995 | A |
5398078 | Masuda et al. | Mar 1995 | A |
5406334 | Kondo et al. | Apr 1995 | A |
5416651 | Uetake et al. | May 1995 | A |
5416847 | Boze | May 1995 | A |
5428403 | Andrew et al. | Jun 1995 | A |
5434716 | Sugiyama et al. | Jul 1995 | A |
5438369 | Citta et al. | Aug 1995 | A |
5446456 | Seo | Aug 1995 | A |
5455629 | Sun et al. | Oct 1995 | A |
5469216 | Takahashi et al. | Nov 1995 | A |
5469474 | Kitabatake | Nov 1995 | A |
5471501 | Parr et al. | Nov 1995 | A |
5473479 | Takahura | Dec 1995 | A |
5481554 | Kondo | Jan 1996 | A |
5481627 | Kim | Jan 1996 | A |
5490177 | La Rosa et al. | Feb 1996 | A |
5495298 | Uchida et al. | Feb 1996 | A |
5499057 | Kondo et al. | Mar 1996 | A |
5552608 | Gallagher et al. | Sep 1996 | A |
5557420 | Yanagihara et al. | Sep 1996 | A |
5557479 | Yanagihara | Sep 1996 | A |
5571862 | Williams et al. | Nov 1996 | A |
5577053 | Dent | Nov 1996 | A |
5583573 | Asamura et al. | Dec 1996 | A |
5594807 | Liu | Jan 1997 | A |
5598214 | Kondo et al. | Jan 1997 | A |
5617333 | Oyamada et al. | Apr 1997 | A |
5625715 | Trew et al. | Apr 1997 | A |
5636316 | Oku et al. | Jun 1997 | A |
5649053 | Kim | Jul 1997 | A |
5663764 | Kondo et al. | Sep 1997 | A |
5673357 | Shima | Sep 1997 | A |
5677734 | Oikawa et al. | Oct 1997 | A |
5689302 | Jones | Nov 1997 | A |
5699475 | Oguro et al. | Dec 1997 | A |
5703889 | Shimoda et al. | Dec 1997 | A |
5712957 | Waibel et al. | Jan 1998 | A |
5724099 | Hamdi et al. | Mar 1998 | A |
5724369 | Brailean et al. | Mar 1998 | A |
5737022 | Yamaguchi et al. | Apr 1998 | A |
5751361 | Kim | May 1998 | A |
5751743 | Takizawa | May 1998 | A |
5756857 | Yamaguchi | May 1998 | A |
5790195 | Ohsawa | Aug 1998 | A |
5796786 | Lee | Aug 1998 | A |
5805762 | Boyce et al. | Sep 1998 | A |
5809231 | Yokoyama et al. | Sep 1998 | A |
5841781 | Takeda | Nov 1998 | A |
5841794 | Inoue et al. | Nov 1998 | A |
5852470 | Kondo et al. | Dec 1998 | A |
5855000 | Waibel et al. | Dec 1998 | A |
5861922 | Murashita et al. | Jan 1999 | A |
5878183 | Sugiyama et al. | Mar 1999 | A |
5903481 | Kondo et al. | May 1999 | A |
5936674 | Kim | Aug 1999 | A |
5938318 | Araki | Aug 1999 | A |
5940411 | Takeda | Aug 1999 | A |
5944851 | Lee | Aug 1999 | A |
5946044 | Kondo et al. | Aug 1999 | A |
5987183 | Saunders et al. | Nov 1999 | A |
6052814 | Karasawa | Apr 2000 | A |
6065119 | Sandford, II et al. | May 2000 | A |
6067636 | Yao et al. | May 2000 | A |
6078700 | Sarachik | Jun 2000 | A |
6191710 | Waletzki | Feb 2001 | B1 |
6356661 | Wen | Mar 2002 | B1 |
Number | Date | Country |
---|---|---|
0 398 741 | Nov 1990 | EP |
0 527 611 | Aug 1992 | EP |
0 558 016 | Feb 1993 | EP |
0 566 412 | Apr 1993 | EP |
0 571 180 | May 1993 | EP |
0 592 196 | Oct 1993 | EP |
0 596 826 | Nov 1993 | EP |
0 605 209 | Dec 1993 | EP |
0 610 587 | Dec 1993 | EP |
0 597 576 | May 1994 | EP |
0 651 584 | Oct 1994 | EP |
0 680 209 | Apr 1995 | EP |
0 746 157 | May 1996 | EP |
0 806 872 | Dec 1997 | EP |
0 833 517 | Apr 1998 | EP |
2 320 836 | Nov 1997 | GB |
7-67028 | Mar 1995 | JP |
WO9607987 | Sep 1995 | WO |
WO9921285 | Oct 1998 | WO |
99 21090 | Apr 1999 | WO |
9921369 | Apr 1999 | WO |
0101702 | Jan 2001 | WO |
Number | Date | Country | |
---|---|---|---|
20030212944 A1 | Nov 2003 | US |