Patent application title: METHOD AND APPARATUS FOR TEMPORAL WAVELET COMPRESSION
Inventors:
Joseph P. Vidunas (Aztec, NM, US)
IPC8 Class: AH04N726FI
USPC Class:
37524019
Class name: Television or motion video signal transform wavelet
Publication date: 2009-12-31
Patent application number: 20090323819
Inventors list |
Agents list |
Assignees list |
List by place |
Classification tree browser |
Top 100 Inventors |
Top 100 Agents |
Top 100 Assignees |
Usenet FAQ Index |
Documents |
Other FAQs |
Patent application title: METHOD AND APPARATUS FOR TEMPORAL WAVELET COMPRESSION
Inventors:
Joseph P. Vidunas
Agents:
SETTER ROCHE LLP
Assignees:
Origin: ERIE, CO US
IPC8 Class: AH04N726FI
USPC Class:
37524019
Patent application number: 20090323819
Abstract:
A system is described that comprises a method and apparatus for further
compressing an already compressed data stream, using a mathematical
comparison computation. The method comprises: receiving a data stream
that has been compressed using a first compression protocol;
decompressing the data stream using the first compression protocol;
reducing temporal redundancy in the data stream using a comparison
protocol; and recompressing the data stream using the first compression
protocol. The apparatus comprises: a decompression unit to receive and
decompress a compressed data stream to produce decompressed data; a
comparison unit, coupled to the decompression unit, to perform a
mathematical comparison operation on the decompressed data to produce
resultant data; and a recompression unit to compress the resultant data
to produce a further compressed data stream.Claims:
1. A method for further compressing a compressed data stream,
comprising:receiving a data stream that has been compressed using a first
compression protocol and a second compression protocol;decompressing the
data stream using the first compression protocol;reducing temporal
redundancy in the data stream using a comparison protocol;
andrecompressing the data stream using the first compression protocol.
2. The method as recited in claim 1, wherein the first compression protocol includes run-length encoding and entropy encoding of quantized data.
3. The method as recited in claim 2, wherein the entropy encoding is Huffman encoding.
4. The method as recited in claim 1, wherein the second compression protocol includes wavelet compression.
5. The method as recited in claim 1, further comprising:determining whether a recompressed data stream resulting from said recompressing is further compressed than the received data stream; anddiscarding the recompressed data stream if it is not further compressed than the received data stream.
6. A computer-readable medium storing computer-executable instructions to perform a method comprising:receiving a data stream that has been compressed using a first compression protocol and a second compression protocol;decompressing the data stream using the first compression protocol;reducing temporal redundancy in the data stream using a comparison protocol; andrecompressing the data stream using the first compression protocol.
7. The computer-readable medium as recited in claim 6, wherein the first compression protocol includes run-length encoding and entropy encoding of quantized data.
8. The computer-readable medium as recited in claim 7, wherein the entropy encoding is Huffman encoding.
9. The computer-readable medium as recited in claim 6, wherein the second compression protocol includes wavelet compression.
10. The computer-readable medium as recited in claim 6, further comprising:determining whether a recompressed data stream resulting from said recompressing is further compressed than the received data stream; anddiscarding the recompressed data stream if it is not further compressed than the received data stream.
11. An apparatus to further compress a compressed data stream, comprising:means for receiving a data stream that has been compressed using a first compression protocol and a second compression method;means for decompressing the data stream using the first compression protocol;means for reducing temporal redundancy in the data stream using a comparison protocol; andmeans for recompressing the data stream using the first compression protocol.
12. The apparatus as recited in claim 11, wherein the first compression protocol includes a run-length encoding and an entropy encoding of quantized data.
13. The apparatus as recited in claim 12, wherein the entropy encoding is Huffman encoding.
14. The apparatus as recited in claim 11, wherein the second compression protocol includes wavelet compression.
15. The apparatus as recited in claim 11, further comprising:means for determining whether a recompressed data stream resulting from said recompressing is further compressed than the received data stream; andmeans for discarding the recompressed data stream if it is not further compressed than the received data stream.
16. An apparatus to further compress a compressed data stream, comprising:a decompression unit to receive and partially decompress the compressed data stream to produce partially decompressed data;a comparison unit, coupled to the decompression unit, to perform a mathematical compare operation on the decompressed data to produce resultant data; anda recompression unit to compress the resultant data to produce a further compressed data stream.
17. The apparatus as recited in claim 16, wherein said decompression unit comprises:an entropy encoding/decoding unit, to receive the compressed data stream and to decode the compressed data stream to produce decoded data; anda run-length encoding/decoding unit, coupled to said entropy encoding/decoding unit and said comparison unit, to further decode the decoded data into quantized data supplied to said comparison unit as the partially decompressed data.
18. The apparatus as recited in claim 17, wherein the entropy encoding/decoding unit is a Huffman entropy encoder/decoder.
19. The apparatus as recited in claim 17, wherein said recompression unit shares said entropy encoding/decoding and run-length encoding/decoding units with said decompression unit bysaid run-length encoding/decoding unit encoding the resultant data after said comparison unit processes the quantized data, to produce encoded data, andsaid entropy encoding/decoding unit compressing the encoded data to produce the further compressed data.
20. The apparatus as recited in claim 16, wherein said comparison unit performs the comparison operation by calculating qn[x,y,b]=qn[x,y,b]⊕q(n-1)[x,y,b], where n is the frame number, and where q is a quantized wavelet coefficient at a point determined by pixel locations x and y in the wavelet band corresponding to value b.
Description:
CROSS-REFERENCE TO RELATED APPLICATION(S)
[0001]This patent application is a continuation of U.S. patent application Ser. No. 10/096,490 filed on Mar. 13, 2002; which is related to and claims priority to U.S. provisional application entitled TEMPORAL WAVELET COMPRESSION ALGORITHM having Ser. No. 60/275,113, by Joseph P. Vidunas, filed Mar. 13, 2001; and which are both hereby incorporated by reference into this application.
BACKGROUND OF THE INVENTION
[0002]1. Field of the Invention
[0003]The present invention is directed to data compression and, more particularly to further compression of already compressed video.
[0004]2. Description of the Related Art
[0005]Image (e.g., video) data is often compressed or processed by using wavelet analysis. Wavelets are mathematical functions that can segment a digital signal into different frequency bands. Wavelets have some advantages over Fourier transforms, but are roughly analogous. Known compression systems convert raw image data into wavelet transform data, then run-length encode or Hoffman encode the data.
[0006]Lossy compression provides high degrees of compression and results in very small compressed files, but there is a certain amount of loss when they are restored (cf. lossless compression, which does not provide as high a degree of compression, but which does not result in any loss upon restoration). Wavelet compression is a lossy compression method used for color images and video. Instead of compressing small blocks of 8×8 pixels as in JPEG and MPEG compression methods, the wavelet algorithms compress the entire image with ratios of up to 300:1 for color and 50:1 for gray scale. An example of a codec that performs wavelet compression is the ADV601 from Analog Devices, Inc. of Norwood, Mass.
[0007]Another known way to compress video is by reducing temporal redundancy using an exclusive-OR (XOR) comparison, an example of which is illustrated in FIG. 1. In FIG. 1, previous frame 101 and current frame 102 are individual, successive frames within a video stream. Each cell of the matrices that form frames 101 and 102 in FIG. 1 (e.g., cells 104 to 111) represents a wavelet coefficient. Upon performing an XOR operation on frames 101 and 102, resultant matrix 103 is produced, which contains cells (e.g., 112-115) corresponding to the cells in the same position in frames 101 and 102, the contents of which are the result of an XOR operation on the corresponding cells in frames 101 and 102. For example, an XOR operation is performed on the contents of cells 104 and 108 which have a value of `0` to produce a `0` result in cell 112. The same result is produced in cells 113-115 when an XOR operation is performed on cells 105 and 109, 106 and 110, and 107 and 111, respectively, because the contents of the corresponding pairs of cells in frames 101 and 102 are identical. Upon performing an XOR operation on cells of frames 101 and 102 with differing contents, such as cells 116 and 117, which contain a `0` and `1,` respectively, a `1` results in box 118 of matrix 103.
[0008]XOR comparison is useful in video streams where each video frame image is usually the same (e.g., security cameras). XOR comparison can be used to dramatically reduce the size of the compressed file because each box of each frame is usually identical to the same box in a subsequent frame, and can therefore be compressed accordingly. However, it is not possible to perform XOR comparison after known wavelet compression of a video stream, like that performed by the ADV601, without reversing the run-length and Huffman encoding to obtain access to the wavelet coefficients.
SUMMARY OF THE INVENTION
[0009]It is an aspect of the present invention to provide a method and apparatus to perform a mathematical comparison operation on the wavelet data from sequential frames of a data stream at the quantized coefficient layer across each of the wavelet frequency bands. It is another aspect of the present invention to selectively apply the results of a mathematical comparison operation where the gain thereby is determined to be significant.
[0010]The above aspects can be attained by a method for further compressing an already compressed data stream, using a mathematical comparison computation by receiving a data stream that has been compressed using a first compression protocol; decompressing the data stream using the first compression protocol; reducing temporal redundancy in the data stream using a comparison protocol; and recompressing the data stream using the first compression protocol.
[0011]The method can be performed by an apparatus having a decompression unit to receive and decompress a compressed data stream to produce decompressed data; a comparison unit, coupled to the decompression unit, to perform a mathematical exclusive-OR operation on the decompressed data to produce resultant data; and a recompression unit to compress the resultant data to produce a further compressed data stream.
[0012]The decompression and recompression units may share components. For example, the decompression and recompression units may include an entropy (e.g. Huffman) encoding/decoding unit, to receive the compressed data stream and perform decompression to produce decompressed data and a run-length encoding/decoding unit, coupled with the entropy encoding/decoding unit to decode the decompressed data into quantized data that is supplied to the comparison unit. The run-length encoding/decoding unit then compresses the resultant data from the comparison unit to produce run-length encoded data, and the entropy encoding/decoding unit compresses the run-length encoded data to produce the further compressed data stream.
[0013]The aspects described above, together with other aspects and advantages that will be subsequently apparent, reside in the details of construction and operation as more fully hereinafter described and claimed, reference being made to the accompanying drawings forming a part hereof, wherein like numerals refer to like parts throughout.
BRIEF DESCRIPTION OF THE DRAWINGS
[0014]FIG. 1 is an example of a conventional exclusive-OR comparison operation.
[0015]FIG. 2 is a flowchart of a method for temporal wavelet compression, according to embodiments of the present invention.
[0016]FIG. 3 is a block diagram of an apparatus for temporal wavelet compression, according to embodiments of the present invention.
[0017]FIG. 4 is a flowchart of a method for temporal wavelet compression after a data stream has already been compressed by an ASIC for wavelet compression, according to embodiments of the present invention.
[0018]FIG. 5 is a block diagram of an apparatus for temporal waveform compression after a data stream has already been compressed by an ASIC for wavelet compression, according to embodiments of the present invention.
[0019]FIG. 6 is a block diagram of a video system with a temporal wavelet compression unit, according to embodiments of the present invention.
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0020]Temporal wavelet compression reduces the data rate of an intra-frame wavelet video stream by applying a mathematical exclusive-OR (XOR) operation on the wavelet data from sequential frames at the quantized wavelet coefficient layer across each of the wavelet frequency bands. This means the XOR operation is applied to all of the wavelet bands. The number of wavelet bands can vary in number depending on the intra-frame wavelet component. For example, an off-the-shelf compression ASIC, such as Analog Devices ADV601, used in an embodiment of the present invention (see the discussion of FIGS. 4 and 5, below) produces 42 wavelet frequency bands. There is no selection of particular wavelet bands, unless a frequency band threshold is used as described below (in regard to FIG. 4).
[0021]FIG. 2 is a flowchart of a method for temporal wavelet compression, according to embodiments of the present invention. Specifically, FIG. 2 illustrates method 130, which begins where quantized data is received 132. The result of the quantization in the intra-frame wavelet process is a matrix of wavelet coefficients rounded to distinct values either preconfigured or calculated by the intra-frame wavelet process. An XOR operation is then performed 134 on the quantized data. A last frame buffer simply holds 136 the wavelet coefficients from the last frame to provide a basis for an XOR comparison. The equation for the comparison is:
qn[x,y,b]=qn[x,y,b]⊕+q.sub.(n-1)[x,y,b]
where n is the frame number and q is a quantized wavelet coefficient at a point determined by pixel locations x and y in the wavelet band corresponding to value b. The XOR operation was chosen for the comparison for the following reasons: (1) it results in a zero value if the coefficients in sequential frames are the same; (2) it will not overflow the double byte capacity of the wavelet coefficients; and (3) it is easily reversed in the decode operation by applying the exact same equation and (4) XOR can be calculated by Pentium II class processors in only one clock cycle.
[0022]Application of temporal wavelet compression produces a temporal wavelet frame in which the quantized value at a particular band, horizontal, and vertical position is equal to the result of an XOR operation between itself and the corresponding value in the previous frame. Since the quantized wavelet coefficients are very similar from frame to frame in the average security video scene, the mathematical XOR operation will result in a zero value in more than 98% of the operations. Conventional run-length encoding is then applied 138 to these primarily zero values to produce a significant data reduction from the original frame. Further, the data is entropy encoded 140.
[0023]FIG. 3 is a block diagram of an apparatus for temporal wavelet compression, according to embodiments of the present invention. Specifically, FIG. 3 illustrates XOR comparison unit 150, which is coupled to receive quantized data. In an embodiment, XOR comparison unit 150 performs the XOR operation described above. Last frame buffer 152 holds the wavelet coefficients from the last frame to provide a basis for an XOR comparison. Run-length encoding unit 154 is coupled with XOR compression unit 150, and encodes the XOR-compressed data. Entropy encoding unit 156 is coupled with run-length encoding unit 154, and encodes the run-length encoded data. In an embodiment, entropy encoding unit 156 is a Huffman encoding unit. The run-length and entropy encoding can be performed according to conventional protocols.
[0024]FIG. 4 is a flowchart of a method for temporal wavelet compression after a data stream has already been compressed by an ASIC for wavelet compression, according to embodiments of the present invention. Specifically, FIG. 4 illustrates method 170, which begins where a compressed data stream is received 172. In an embodiment, the compressed data stream is received from a compression application-specific integrated circuit (compression ASIC) (e.g., an ADV601), and is a compressed video stream from a security camera. In this embodiment, the video stream is compressed using run-length encoding and entropy encoding. The data stream is then decompressed 173, which, in the embodiment just described, involves reversing the run-length and entropy encoding. A check is made to determine whether a key frame is the current frame received 174. If so, the original frame is copied to an out buffer 175, the wavelet data is stored to a last frame buffer 176, and the out buffer is transmitted 177. If not, a check with outside conditions is made to determine whether to recalculate the frequency band compression threshold 178 to determine at what point wavelet frequency bands should be skipped, where the skipped frequency bands have already been compressed enough using the first compression protocol. A threshold is either recalculated 179 or left at is existing value.
[0025]A frequency band is selected 180, and then is checked to determine whether the current frequency band is within the threshold 181. If not, the original data is copied to the out buffer 183 (and the method continues as indicated in FIG. 4). If so, a XOR operation is performed using the wavelet coefficient data for the current frequency band from the current frame and the previous frame 182. The frequency band is then recompressed 184 using the same compression protocol as was used when received, e.g., run-time and entropy encoding. Raw data after quantization is generally zero in 60% to 80% of the coefficients. After the additional inter-frame XOR comparison, the percentage increases to between 90% and 99%.
[0026]A check is then made to determine whether the XOR-resultant data is further compressed over the received data stream 185. If so, the XOR-resultant data is copied to the out buffer 186. If not, the original data is copied to the out buffer 183.
[0027]A check is made to determine whether all frequency bands are complete 187. If not, another band is selected 180 (and the method continues as indicated in FIG. 4). If so, the wavelet data is stored to a last frame buffer 176, and the out buffer is transmitted 177. In an embodiment, the result of method 170 is transmitted. In an embodiment, the result of method 170 is stored.
[0028]As noted above, off-the-shelf components, which may include compression ASIC such as an ADV601, are used in the present implementation to perform the conventional intra-frame wavelet compression. Since these components completely encode the data, the run-length and entropy encoding are reversed to obtain quantized data for temporal wavelet compression. The present invention takes advantage of knowing the results of the conventional intra-frame wavelet compression to make a determination of how well each wavelet band has been compressed in the run-length and entropy encoding steps. A ratio of the size of the encoded data to the raw quantized data is compared to a frequency band compression threshold to determine if the particular band is already so small that it would be a waste to attempt to compress it any further. The threshold value can be scaled between a useful range of about 1-30% to maximize compression or minimize processor usage.
[0029]The frequency band compression threshold parameter allows the algorithm to be applied selectively to the bands where the highest data rates are found. This allows scaling the compression to minimize data rate or processor utilization depending on the operational environment.
[0030]Applying the Temporal Wavelet Algorithm to the intra-frame wavelet stream produces a greatly reduced data rate. In a test of average sample data, this reduction was on the order of 40-60%. The mathematical XOR comparison is very simple and is relatively easy to accomplish using only software and existing processors. Using highly optimized software code, this algorithm can be applied to QCIF wavelet frames at an average rate over 100 frames per second on Pentium II class processors. The frequency band compression threshold parameter allows the algorithm to be applied selectively to the bands where the highest data rates are found. This allows scaling the compression to minimize data rate or processor utilization depending on the operational environment.
[0031]Alternative embodiments include using an intra-frame wavelet stream with no temporal data reduction, using some other temporal reduction involving perhaps motion estimation, or using another common temporal compression scheme like the MPEG varieties.
[0032]FIG. 5 is a block diagram of an apparatus for temporal wavelet compression after a data stream has already been compressed by an analog device for temporal wavelet compression, according to an embodiment of the present invention. Specifically, FIG. 5 illustrates temporal wavelet compression unit 204 (illustrated using dashed lines), which comprises entropy encoding/decoding unit 190, run-length encoding/decoding unit 192, exclusive-OR compression unit 194, and last frame buffer unit 196. Entropy encoding/decoding unit 190 is coupled to unillustrated components to send and receive compressed data, and encodes run-length encoded data or decodes entropy encoded data. Run-length encoding/decoding unit 192 is coupled with entropy encoding/decoding unit 190, and encodes XOR compared data or decodes run-length encoded data. Exclusive-OR comparison unit 194 is coupled with run-length encoding/decoding unit 192, and performs XOR comparison on a data stream. Last frame buffer unit 196 holds the wavelet coefficients for the previously processed frame to provide a basis for the XOR comparison. The apparatus illustrated in FIG. 5 is capable of further compressing already compressed data received from a compression ASIC by reducing temporally redundant data from the data stream. In an embodiment, entropy encoding/decoding unit 190 is a Huffman encoder/decoder.
[0033]Embodiments of the present invention may also be incorporated into a system. FIG. 6 is a block diagram of a video system with a temporal waveform compression unit, according to embodiments of the present invention. Specifically, FIG. 6 illustrates system 199, in which comprises video camera 200 is connected to compression ASIC 202; compression ASIC 202 is connected to temporal wavelet compression unit 204 (in an embodiment, via memory unit 205 as described below); temporal wavelet compression unit 204 is connected to storage unit 206 (in an embodiment, via memory unit 205 as described below); storage unit 206 is connected to transmittal unit 208 (in an embodiment, via memory unit 205 as described below); and transmittal unit 208 is connected to a network (not shown) for transmission of compressed data to network customers 212.
[0034]In an embodiment, video camera 200 is a security camera. In an embodiment, compression ASIC 202 is an ADV601 as previously described above. In an embodiment, storage unit 206 is an online IDE hard drive. In an embodiment, transmittal unit 208 is a network interface. In an embodiment, system 199 also comprises memory unit 205, which can be PC SDRAM chips. In an embodiment, system 199 also comprises digital recorder 210 (illustrated in FIG. 6 using dashed lines), which comprises compression ASIC 202, temporal wavelet compression unit 204, storage unit 206, transmittal unit 208, and memory unit 205 (if included in system 199).
[0035]In an embodiment, system 199 is capable of generating a video signal, compressing it using entropy and run-length encoding, decompressing it using the same protocols, performing an XOR operation to compress the data, recompressing the XOR-compared data using entropy and run-length protocols, and storing or transmitting the compressed data. The XOR and entropy/run-length encoded data stream is smaller than without the XOR comparison.
[0036]The chipset included in the system includes memories, processors, and/or ASICs. Such memory includes a machine-readable medium on which is stored a set of instructions (i.e., software) embodying any one, or all, of the methodologies described herein. Software can reside, completely or at least partially, within this memory and/or within the processor and/or ASICs. For the purposes of this specification, the term "machine-readable medium" shall be taken to include any mechanism that provides (i.e., stores and/or transmits) information in a form readable by a machine (e.g., a computer). For example, machine-readable media include read only memory (ROM), random access memory (RAM), magnetic disk storage media; optical storage media, flash memory devices, electrical, optical, acoustical, or other form of propagated signals (e.g., carrier waves, infrared signals, digital signals, etc.), etc.
[0037]The many features and advantages of the invention are apparent from the detailed specification and, thus, it is intended by the appended claims to cover all such features and advantages of the invention that fall within the true spirit and scope of the invention. Further, since numerous modifications and changes will readily occur to those skilled in the art, it is not desired to limit the invention to the exact construction and operation illustrated and described, and accordingly all suitable modifications and equivalents may be resorted to, falling within the scope of the invention.
User Contributions:
comments("1"); ?> comment_form("1"); ?>Inventors list |
Agents list |
Assignees list |
List by place |
Classification tree browser |
Top 100 Inventors |
Top 100 Agents |
Top 100 Assignees |
Usenet FAQ Index |
Documents |
Other FAQs |
User Contributions:
Comment about this patent or add new information about this topic: