1. Field of the Invention
The present invention relates to the recovery of data. More particularly, the present invention relates to the recovery of lost/damaged block data in a bitstream of compressed data.
2. Art Background
It is often desirable to compress data, such as video images or sound data, for transmission and storage. Typically, when data is compressed, compression constants are generated. In some instances block-wide data is generated. These constants are transmitted or stored along with the compressed image. Problems can arise if the compression constants are lost or damaged prior to decompression of the data. As an illustration, the discussion below illustrates the problems that arise if image data compression constants are lost.
The discrete data points that make up a digital image are known as pixels. Typically, each pixel is represented independently using 8 bits, but other representations also are used for the purposes of compression or analysis. Most of the alternative representations begin by dividing this raw data into disjoint sets. For historical reasons, these sets are referred to as “blocks”, even though they may not have a traditional block shape. The alternative representation then characterizes the data by some block-wide information and per-pixel information.
Examples of block-wide information include the minimum pixel value (MIN), the maximum pixel value (MAX), and the dynamic range of the pixel values (DR), where DR=MAX−MIN or DR=1+MAX−MIN. Per-pixel information may indicate where the pixel value lies within the range specified by the global information. For compression to be achieved, the per-pixel information must use only a few bits of storage so that the total number of bits used is less than that required to store the raw image.
In one example, the block data is comprised of the MIN, DR and Qbit number (defined below), and the pixel data is comprised of Q codes. A Q code is a Qbit number that can be an integer in the range [0, 2Q−1] that identifies one value in the set {MIN, MIN+1, . . . ,MAX}. Since the Qbit number is generally small and the DR value may be relatively large, it is generally not possible to represent all pixel values exactly. Therefore, some quantization error is introduced when pixel values are reduced to Q code values. For instance, if the Qbit number is 3, then it is generally possible to represent 23=8 values from the set {MIN, MIN+1, . . . , MAX} without any error. Pixels with other values are rounded to one of these eight values. This rounding introduces quantization error.
If any of the block information, e.g., MIN, MAX or DR, is lost, the damage to the image is potentially large as many pixels are affected. For this reason, it is desirable to have techniques for accurately estimating or recovering the values of this lost data.
Recovery methods fall into two categories: decoded domain, and encoded domain. Decoded domain techniques restore portions of the image to its raw data format and then exploit local correlation properties to estimate the missing data. Data recovery, including compression constants, may be performed in the decoded domain. However, additional computation and time, and therefore additional expense, is required to perform and evaluate decodings.
The system and method of the present invention provides an innovative technique for recovering lost or damaged (lost/damaged) compression constants of a block in the encoded domain. In one embodiment, a lost/damaged compression constant is recovered by estimating a compression constant of the block using encoded data of at least one neighboring block of data and other recoverable compression constants of the block and neighboring block. For example, in one embodiment wherein the encoded data comprises image data, each block of data consists of dynamic range (DR) and Minimum (MIN) constants, where DR=MAX−MIN and MAX represents a maximum data value in the block.
The objects, features and advantages of the present invention will be apparent from the following detailed description in which:
a illustrates one embodiment of the system of the present invention, and
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 following is described in the context of Adaptive Dynamic Range Coding (ADRC) encoded images, and more particularly to the recovery of lost or damaged (lost/damaged) compression constants such as dynamic range (DR) and Minimum value (MIN). However, it is contemplated that the present invention is not limited to ADRC encoding and the particular compression constants generated; rather it will be apparent that the present invention is applicable to different compression technologies, different types of data, including, but not limited to, sound data and the like, and different compression constants including, but not limited to, the Maximum value (MAX) which may be used in ADRC processes. In addition, the present invention is applicable to different types of ADRC processes including edge-matching and non edge-matching 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.
Referring to
A significant time and cost savings is achieved by using the encoded data of the block and the neighboring block as it is not necessary to go through one or more iterations of a costly decoding process before determining the lost/damaged compression constant.
Continuing with the present example which uses MIN and DR to decode the Q codes, if the MIN value is lost/damaged, the DR value and Q codes of the block and the DR, MIN and Q codes of the neighboring block are used to estimate the MIN value using encoded data.
MIN may be estimated as the value that minimizes an average difference between decoded values from the block and corresponding decoded values from at least one neighboring block. The average function can be a weighted average of neighboring values, for example, the values may be weighted relative to the location of the neighboring block with respect to the block of interest. In one embodiment, MIN may be estimated using a least squares estimation. For example, MIN may be determined as follows:
Non edge-matching ADRC:
Edge-matching ADRC:
where N represents a number of neighboring encoded data to use, MIN′ represents the MIN value of the neighboring block, DR and DR′ respectively represents the DR value of the block and the neighboring block, Q represents a number of quantization bits used to encode the block, Q′ represents a number of quantization bits used to encode the neighboring block, ei represents the encoded data (e.g., Qcodes) and e′i represents the encoded neighboring data, such as the encoded data, of the neighboring block.
If the DR value is lost/damaged, the MIN value and Q codes of the block and the DR, MIN and Q codes of the neighboring block are used to estimate DR.
In one embodiment, DR may be estimated using a least squares estimation. For example:
an integer formula for non edge-matching ADRC:
an integer formula for edge-matching ADRC:
where N represents a number of neighboring encoded data to use, MIN and MIN′ respectively represent the MIN value of the block and the neighboring block, Q represents a number of quantization bits used to encode, Q′ represents a number of quantization bits used to encode the neighboring block, ei and ei′ respectively represent the encoded data of the block and the neighboring block and DR′ represents the dynamic range of the neighboring block.
In another embodiment, an alternate recovery formula may be used. DR may be estimated as the value that makes the sum of decoded values of the block equal to the sum of the decoded values of the neighboring block. For example, DR is determined according to the following equation:
Non edge-matching ADRC:
Edge-matching ADRC:
where N represents a number of neighboring encoded data to use, MIN and MIN′ respectively represent the MIN value of the block and the neighboring block, Q represents a number of quantization bits used to encode, Q′ represents a number of quantization bits used to encode the neighboring block, ei and ei′ respectively represent the encoded data of the block and the neighboring block and DR′ represents the dynamic range of the neighboring block.
If CEN and DR are used to decode the Q codes, and the CEN value is lost/damaged, the DR value and Q codes of the block and the DR, CEN and Q codes of the neighboring block are used to estimate the CEN value using encoded data.
CEN may be estimated as the value that minimizes an average difference between decoded values from the block and corresponding decoded values from at least one neighboring block. In one embodiment, CEN may be estimated using a least squares estimation. For example, CEN may be determined as follows:
Non edge-matching ADRC:
Edge-matching ADRC:
where N represents a number of neighboring encoded data to use, CEN′ represents the CEN value of the neighboring block, DR and DR′ respectively represents the DR value of the block and the neighboring block, Q represents a number of quantization bits used to encode the block, Q′ represents a number of quantization bits used to encode the neighboring block, ei represents the encoded data (e.g., Qcodes) and e′i represents the encoded neighboring data, such as the encoded data, of the neighboring block.
If the DR value is lost/damaged, the CEN value and Q codes of the block and the DR, CEN and Q codes of the neighboring block are used to estimate DR.
In one embodiment, DR may be estimated using a least squares estimation. For example:
an integer formula for non edge-matching ADRC:
an integer formula for edge-matching ADRC:
where N represents a number of neighboring encoded data to use, CEN and CEN′ respectively represent the MIN value of the block and the neighboring block, Q represents a number of quantization bits used to encode, Q′ represents a number of quantization bits used to encode the neighboring block, ei and ei′ respectively represent the encoded data of the block and the neighboring block and DR′ represents the dynamic range of the neighboring block.
In another embodiment, an alternate recovery formula may be used. DR may be estimated as the value that makes the sum of decoded values of the block equal to the sum of the decoded values of the neighboring block. For example, DR is determined according to the following equation:
Non edge-matching ADRC:
Edge-matching ADRC:
where N represents a number of neighboring encoded data to use, CEN and CEN′ respectively represent the CEN value of the block and the neighboring block, Q represents a number of quantization bits used to encode, Q′ represents a number of quantization bits used to encode the neighboring block, ei and ei′ respectively represent the encoded data of the block and the neighboring block and DR′ represents the dynamic range of the neighboring block.
Other embodiments are also contemplated. For example, if MIN and MAX are used as compression constants, and one of them is damaged, DR is estimated and the compression constant is computed from the estimated DR. Furthermore, if MAX and DR are used, processing similar to MIN and DR described herein is used. Furthermore, other constants specifically not identified herein may be used. It is contemplated that other constant levels may function similar to MIN and appropriate equations would be derived therefrom.
In an alternate embodiment, variables used to determine other compression constants are also used to determine other compression constants discussed herein. For example, for data encoded using ADRC, the Qbit and motion flag values utilize the following variables:
where ei and ei′ respectively represent the encoded data of the block and the neighboring block. As a large percentage of the hardware is devoted to computing the above sums (because the sums may be taken over N usable neighboring relations), the complexity of MIN and DR estimation circuits may be greatly reduced by inputting X and Y values where applicable. Thus, in one embodiment, for example, using X and Y, MIN and DR may be determined as follows:
Non edge-matching ADRC:
Edge-matching ADRC:
where N represents the number of neighboring data, Q and Q′ respectively represent the Q bit number of the block and the neighboring block, MIN′ represents the MIN value of the neighboring block, DR and DR′ respectively represent the DR of the block and neighboring block.
In an alternate embodiment, using X and Y, CEN and DR may be determined as follows:
Non edge-matching ADRC:
Edge-Matching ADRC:
In the present embodiments, the numerator may be clipped such that n=max(0,n).
The numerator and denominator of the above equations may be large (e.g. 24 bits), thus, a general purpose divider to accommodate a range of values would require much hardware. It has been determined that certain efficiencies can be realized without compromising on the effectiveness of the results. As the allowed ranges of the compression values (e.g. MIN and DR) are restricted to certain ranges (e.g. 0-255 for one implementation), only a low precision (e.g. 8 bit) is required. It has also been determined that leading zeros can be eliminated without changing the accuracy of the result and the least significant bit can be truncated with only a minor effect on the result.
Thus, an alternate embodiment is described with reference to FIG. 2. In this embodiment, the steps can be performed quickly in hardware logic. As noted above the equations require a division operation to be performed; therefore, a numerator and denominator of the quotient will be referred to in the following discussion.
At step 205, the numerator of one of the above formulae is computed using full precision. At step 210, the denominator is computed using full precision. At step 215, the numerator and denominator are reduced by shifting off the least significant bit until both are at least K-bits in length (i.e., until K-bits or less in length). In the present embodiment, the numerator and denominator are shifted the same number of bits. However, in alternate embodiments, the numerator and denominator maybe shifted a different number of bits. In such an embodiment, compensation would be made elsewhere for the bit-shift differential.
Thus, in the present embodiment, while (n≧2K or d≧2K), then
n/2 (shift off LSB)
d/2 (shift off LSB)
where n represents the value of the numerator and d represents the value of the denominator.
A value of K is selected such that integer division can be performed using cost efficient logic while maintaining an acceptable image quality. In one embodiment, K is selected such that the maximum error is not visually detectable, e.g., the maximum error is not greater than 3%. In the present embodiment in which an 8 bit encoding is used, K is selected to be 13.
At step 230, the value is clipped for consistency with the auxiliary information available, for example other available compression constants. In the present example, the value is clipped to satisfy the allowable range of values. For example, for 8 bit ADRC:
non edge-matching ADRC:
MIN+DR≦254
CEN+DR/2≦254′
edge-matching ADRC:
MIN+DR≦255
CEN+DR/2≦255
One embodiment of the system of the present invention is illustrated in
Referring to
Computation logic 350 performs an integer division of the numerator and denominator. Clip logic 360 is optionally included to clip the output of computation logic 350 to be consistent with other available compression constants. Thus, using this structure, a fast, cost efficient circuit is provided for estimating lost/damaged compression constants.
The output of the circuit is preferably coupled to additional logic (not shown) which decodes using data including the recovered compression constant. In one embodiment in which the data is image data, the decoded data is used to drive a display device.
An alternate embodiment of the circuit for recovering lost/damaged compression constants is shown in
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.
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.
This application is a continuation-in-part of U.S. patent application Ser. No.: 09/249,596, filed Feb. 12, 1999, titled “Apparatus and Method for the Recovery of Compression Constants in the Encoded Domain”.
Number | Name | Date | Kind |
---|---|---|---|
3311879 | Daher | Mar 1967 | 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 |
4509150 | Davis | Apr 1985 | A |
4532628 | Matthews | Jul 1985 | A |
4574393 | Blackwell et al. | Mar 1986 | A |
4586082 | Wilkinson | Apr 1986 | A |
4656514 | Wilkinson et al. | Apr 1987 | A |
4675735 | Wilkinson et al. | Jun 1987 | 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 |
4807033 | Keesen et al. | Feb 1989 | A |
4815078 | Shimura | Mar 1989 | A |
4845560 | Kondo et al. | Jul 1989 | A |
4885636 | Sullivan | Dec 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 et al. | 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 |
5247363 | Sun et al. | Sep 1993 | A |
5258835 | Kato | Nov 1993 | A |
5307175 | Seachman | Apr 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 |
5400076 | Iwamura | 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 | Takakura | Dec 1995 | A |
5481554 | Kondo | Jan 1996 | A |
5481627 | Kim | Jan 1996 | A |
5495298 | Uchida et al. | Feb 1996 | A |
5499057 | Kondo et al. | Mar 1996 | A |
5552608 | Shimizume | Sep 1996 | A |
5557420 | Yanagihara et al. | Sep 1996 | A |
5557479 | Yanagihara | Sep 1996 | A |
5577053 | Dent | Nov 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 |
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 |
5751862 | Williams et al. | May 1998 | A |
5786857 | Yamaguchi | Jul 1998 | A |
5790195 | Ohsawa | Aug 1998 | A |
5796786 | Lee | Aug 1998 | A |
5805762 | Boyce et al. | Sep 1998 | A |
5809041 | Shikakura et al. | Sep 1998 | A |
5809231 | Yokoyama et al. | Sep 1998 | A |
5852470 | Kondo et al. | Dec 1998 | A |
5861922 | Murashita et al. | Jan 1999 | A |
5878183 | Sugiyama et al. | Mar 1999 | A |
5896466 | Kim | Apr 1999 | A |
5903481 | Kondo et al. | May 1999 | A |
5933571 | Bannai et al. | Aug 1999 | A |
5936674 | Kim | Aug 1999 | A |
5938318 | Araki | Aug 1999 | A |
5946044 | Kondo et al. | Aug 1999 | A |
6067636 | Yao et al. | May 2000 | A |
6137915 | Chai | Oct 2000 | A |
6363118 | Kondo et al. | 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 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 |
Number | Date | Country | |
---|---|---|---|
20030223490 A1 | Dec 2003 | US |
Number | Date | Country | |
---|---|---|---|
Parent | 09249596 | Feb 1999 | US |
Child | 09342329 | US |