|Publication number||US5689589 A|
|Application number||US 08/347,789|
|Publication date||Nov 18, 1997|
|Filing date||Dec 1, 1994|
|Priority date||Dec 1, 1994|
|Also published as||DE19544761A1, DE19544761C2|
|Publication number||08347789, 347789, US 5689589 A, US 5689589A, US-A-5689589, US5689589 A, US5689589A|
|Inventors||Michael J. Gormish, Martin P. Boliek|
|Original Assignee||Ricoh Company Ltd., Ricoh Corporation|
|Export Citation||BiBTeX, EndNote, RefMan|
|Patent Citations (8), Referenced by (52), Classifications (15), Legal Events (4)|
|External Links: USPTO, USPTO Assignment, Espacenet|
The present invention relates to the field of image compression, more specifically to the problem of compressing a sequence of digital images.
Compression of digital images is the process of rearranging the bits of an uncompressed image to form a compressed image using fewer bits. With lossless compression, the compressed image contains enough information to allow perfect reconstruction of the original uncompressed image. Some compression processes are lossy, where the uncompressed image can only be approximately reconstructed. In applications where lossy compression is used, the character of the digital images and the compression scheme are such that the reconstructed image looks enough like the original image so that the losses are not a problem. For example, in some lossy compression schemes, a small amount of the color variation or sharpness of an image is lost.
Despite the inability to perfectly reconstruct an image, lossy compression is still desirable because it often results in greater compression ratios than lossless compression. However, in some applications, losses are not tolerable and the compression must be lossless. In these applications, efficient lossless compression is needed. Efficiency, as used herein, refers to the compression ratio obtainable. Thus, a compressor which compresses a given input image to one quarter its size (compression ratio of 4:1) is more efficient than a compressor which compresses the given input image to one half its size (compression ratio of 2:1). The speed at which compression occurs given limited computing power is a different measure of compressor efficiency, but one which is not discussed here.
A digital image is described by a collection (usually a two-dimensional array) of pixel values assigned to pixels (for brevity, the terms "pixel" and "pixel value" are often used interchangeably). The pixel values indicate which color the pixel should be colored to form the image. If the image is a "palettized" image, the pixel values do not directly indicate the color values, but are indices into a color table which stores a cross reference matching each index value to a color value. One advantage of a palettized image over a nonpalettized image is that the group of like colored pixels can be changed just by changing one value in the color table. This aspect of palettized images is especially useful in video games. For example, a video game could store one palettized image of a race car and display a different colored race car for each player by assigning a different color table to each player. With nonpalettized images, one image would be needed for each player.
A disadvantage of palettized images is that they usually need to be compressed losslessly. Lossy compression might result in slight errors in pixel values. With nonpalettized images, these slight errors usually translate to slight shifts in the color values, which does not greatly affect the image. However, with palettized images, the errors translate to slight shifts in the index values, which may translate to major shifts in color which change the image a great deal.
One method of compression is taught by Zandi, et at., in a patent application entitled "Compression of Palettized Images and Binarization for Bitwise Coding of M-ary Alphabets Therefor", filed Feb. 23, 1994 as Application Ser. No. 08/200,233 and assigned to the assignee of the present invention. That application is incorporated by reference herein and is referred to as "Zandi". In Zandi, the existence of a color table is used to the advantage of a compression system. Since the pixel values of the image are arbitrary indexes into a table, the entries of the table can be rearranged without loss of information, so long as the color values in the table entries pointed to by the pixel values don't change. With this constraint, the pixel values are reassigned so that the bits of the pixel values are more compressible.
While the compression of Zandi is quite useful, even greater compression is needed where multiple images forming a moving display (i.e., a video sequence) need to be stored, since up to 60 images, or frames, need to be created for each second of the video sequence. At an image resolution of 256 pixels×240 pixels per image, and 8-bit pixel values, one uncompressed frame requires 61440 bytes (8 bits/byte) of storage, and a one second (60 frame) video sequence requires 3,686,400 bytes of storage unless it is uncompressed.
Good compression is important for video games which use video sequences and are supplied on video cartridges, because the game instructions, fixed images and video sequences are all stored in a Read Only Memory (ROM). Given that the video cartridges must be low-cost, video game designers are often constrained to a limited ROM size. Consequently, they desire better compression, which allows either more scenes to be included in a limited ROM, or allows for the use of a smaller, less expensive ROM for storage.
A compressor sequentially reads symbols from an input block to be compressed, compresses those symbols, and generates an output file. If the input file is a digital image or a sequence of frames (each frame being a digital image), the symbols are pixel values. When read sequentially, the pixel values are typically sequenced starting with the top row of pixels and moving to the bottom row of pixels, sequencing from left to right within each row. The original pixel being compressed is referred to as the "current" pixel, with "prior pixels" referring to those pixels already operated upon, "upcoming pixels" referring to pixels not yet operated upon, and a "next" pixel being the upcoming pixel operated upon immediately following the current pixel. Some compressors compress one bit of the current pixel at a time, in which case the bit being operated upon is said to be in the current bit plane.
A compressor includes a coder which converts the current symbol into a number of compressed bits (codeword). The codewords for all the symbols form the output block. In some coders the relation of the input symbols to the output codewords is fixed. In an adaptive entropy coder, the relation varies depending on the probability of occurrence of the current symbol. An entropy coder is so named because it attempts to compress data to the theoretical compression limit dictated by entropy. Entropy dictates that, on average, a symbol S cannot be coded into a number of bits less than the binary log of the inverse of the probability of the symbol S occurring. In other words, if the probability of symbol S occurring is P, then at least N=log2 (1/P) bits are needed to indicate symbol S in a compressed block for that symbol to be extractable from that compressed block. Thus, a compression ratio greater than the entropy limit is not possible for lossless compression.
In a Huffman coder, the number of bits per codeword is constrained to be a whole number, thus some codewords will be expressed by fractionally more bits than are required by entropy for the probability of that codeword. Because of this rounding, a Huffman coder does not compress as well as an entropy coder which can express codewords with fractional bits. The use of codewords with fractional numbers of bits is made possible by allowing codewords to overlap each other.
Even with fractional bits per codeword, an image is typically not compressible to its entropy limit since the probabilities are not determined exactly. Of course, the probability of each pixel value's occurrence in the input image can be determined exactly by studying the entire image, but information which is not available to the decompressor at the time the current pixel is to be decompressed should not be used to decide how to code the current pixel. Otherwise, the decompressor will not have enough information to decode the current pixel.
Fortunately, probability estimates based only on prior pixels provide suitable inputs to an entropy coder. To improve the probability estimates, contexts are used which allow for conditional probability estimates, i.e., given a context, the probability of pixel P being the current pixel. So that a decompressor can determine the context before decoding the current pixel, the context should only depend on prior pixels. The choice of elements which determine the context of a pixel is known as the context model. For example, in one context model, the context for a pixel being compressed is determined by the immediately previous prior pixel. To the extent that the probabilities are better estimated using a particular context model, that context model will result in better compression.
A context model works best when the context is a good predictor of the symbol or pixel being coded. For example, if the context of pixel P is C and the probability of P having the pixel value it has with that context is 0.50, then only one bit is needed to code for that pixel. However, if the probability is 0.70, then only one half bit is needed. Because the more predictable the pixel, the fewer bits, or bit fractions, are needed to code for the pixel, better context models result in better compression. In an image with large areas of solid color, the color of adjacent pixels is a good predictor of the color of the current pixel, and therefore a good context model is one where the context is determined by the color of adjacent pixels.
However, even with a good context model, greater compression is possible and desirable.
The present invention provides improved compression for video sequences by using two sets of contexts, one set to provide context to determine if a current pixel value is the same as a pixel in a corresponding position in a previous frame, and one set to provide context when coding a pixel value which is not the same as the pixel in the previous frame. The present invention provides improved context models by recognizing that temporally close pixels in a video sequence provide valuable context information for a pixel being coded, and where temporally close or spatially close pixels are the same, that information can be expressed using only one decision (a binary decision, but one which may encode to less or more than one bit). Thus, a context modeller which outputs a "sameness" decision need not process or provide an output when the sameness is true.
The use of the sameness decision saves computation because, if in decoding the one sameness decision, a decompressor determines that the pixel is equal to the corresponding pixel in a previous frame, then no further decoding is needed for that pixel.
The pixel pairs used for the sameness test need not be corresponding pixels from two frames, as the sameness bits in some applications could be referring to the sameness of the current pixel value and a pixel value of a pixel in a previous row or a displaced pixel in a previous frame. In fact, the current pixel can be compared to any previously transmitted pixel. For example, a camera might provide motion sensor outputs which indicate how a scene is changing from frame to frame so that the current pixel can be compared with a pixel which would have been in the same position in the previous frame, but for the camera motion (such a camera is shown in U.S. Pat. No. 5,430,480 issued Jul. 4, 1995, issued to Allen, et al. and assigned to the assignee of the present invention, entitled "Sensor Driven Global Motion Compensation"). Additionally, a table lookup, a motion estimation system, or other methods, could be used to deterministically select a previous pixel which is to be compared with the current pixel.
A further understanding of the nature and advantages of the inventions herein may be realized by reference to the remaining portions of the specification and the attached drawings.
FIG. 1 is a block diagram of several applications using compression and decompression to efficiently store or transmit data;
FIG. 2 is a more detailed view of the compressor shown in FIG. 1;
FIG. 3 is a more detailed view of the decompressor shown in FIG. 1;
FIG. 4 is a more detailed view of the context modeller of the compressor shown in FIG. 2;
FIG. 5 is a schematic diagram of how contextual pixels are used to form sameness contexts and residual contexts;
FIG. 6 is a flow chart of the precoding process performed by a context modeller; and
FIG. 7 is a flow chart of the decoding process performed by a context modeller.
FIG. 1 is a block diagram of a generalized application where compression is used. In this system, dam sources generate data and the eventual users of the data are separated from the data source, in time or space, by a limited channel. If the user and the source are not separated, or the channel is not limited, then compression is not really needed.
FIG. 1 shows several data sources, such as a video cassette 102, a still image 104, a video sequence 105 and a workstation 106 which produces rendered images. Where the data source is image data, and especially sequences of image frames, compression is needed because of the large amount of memory needed for uncompressed images or sequences. The present invention is described with reference to frame sequences, however the present invention is useful with other types of data sharing similar characteristics of frame sequence data.
The data is input to a compressor 108 which, if designed correctly, outputs a compressed image or images containing fewer bits than the original data. If compressor 108 is a lossless compressor, the original data is exactly recoverable from the bits of the compressed data. Once the data is compressed, it is applied to a channel, several examples of which are shown in FIG. 1.
One channel is a compact disk ROM (CD-ROM) 100, which is used as means for distributing software and large image files. Even though one CD-ROM might have a capacity of 600 MB (megabytes), some complex computer games require more than that to store images. Thus to fit more data onto a single CD-ROM and relieve a user of the inconvenience of having to constantly swap between multiple disks, the data is compressed to fit onto a single CD-ROM.
Another channel is a game cartridge 112 for use with a video game machine which accepts game cartridges. The constraint with video game cartridges is one of cost: as more physical memory is used, the cost of manufacturing each cartridge goes up. Similar constraints requiting compression apply to other storage media such as disk drive 114 and video tape cassette 116.
For some channels, the limitation is not a limit of storage, but a limit of transmission time and bandwidth, such as occur with a data transmission line 118 (telephone line, dedicated line, cellular telephone transmission, network cable, CD-ROM, etc.) or a packet network 120. Compression is desirable in these applications when the number of bits transferrable in a unit of time is limited and data is needed at a high rate, or where the usage cost of the transmission media is based on the number of bits transferred.
However the data is generated at a data source and transferred to an eventual user separated by the data source in time or space, the data needs to be decompressed by that eventual user, using only that which is transferred over the channel and what is known in advance. For this purpose, a decompressor 122 reconstructs what the data source initially provided to compressor 108.
Because of the separation between the source and the user, only information contained in the transmission can be used to decompress the information. Of course, the data source could provide hints to decompressor 112, but those hints would take up bandwidth in the transmission and should be counted as part of the size of the compressed file anyway. The data source could provide the hints through a different channel, but in a fair assessment of a compression system, this data should be considered part of the compressed data as well. Of course, one way to truly save memory and bandwidth is to have a priori data permanently (or semi-permanently, depending on the application) stored at the data source and at the eventual user system. However, this constrains the types of data which can be transmitted. In most applications, this constraint is not a problem. For example, video game cartridge makers and designers of video games systems usually agree on how their data is formatted and how it is compressed. If not, a portion of the bandwidth might need to be used to communicate setup information, such as image sizes. In one embodiment, images are fixed at 256 pixels wide, 240 pixels high, and 8 bits/pixel. By fixing this information, bandwidth need not be used delimiting the extent of each image. Information fixed ahead of time between the data source and the user system is referred to as "a priori information."
FIG. 2 shows compressor 108 in greater detail, along with an original file 200 representing a sequence of uncompressed images (frames) and a compressed file 220 representing a compressed version of original file 200. Although the compression performed by this system is described with respect to images and sequences of images, other data with similar characteristics is also compressible using this system.
Compressor 108 moves the original data through a context modeller 202C, and an entropy coder 208C to form compressed file 220. Context modeller 202C has an input for accepting original pixels and a pixel clock. In some embodiments, the original data (pixels) are self-clocking and the pixel clock is not needed. Context modeller 202C outputs a result value and a context bin identifier (ID) identifying a context for the result value, each cycle of a result clock. The result value is a binary value for binary entropy coders, and is an M-and value for M-ary coders. Of course, as taught by Zandi, an M-ary coder can be implemented using a binary coder and additional logic or processing.
The result clock is output as well if the data is not self-clocking. Where the input is a data storage device and the elements of compressor 108 are implemented by software modules, the elements are generally self-clocked by the operation of the software.
Context modeller 202C is also coupled to a frame store 204C, to update frame store 204C with the current pixel and to read context pixels or context bits from frame store 204C.
Several elements which form entropy coder 208C will now be described. A probability estimator 210C is coupled to accept the result and the context bin ID from context modeller 202C and outputs a probability value and an outcome value (which is a binary value for a binary bit generator). If necessary, probability estimator 210C also outputs an outcome clock. Probability estimator 210C is coupled to a sameness context table 212C and a residual context table 214C, to update probabilities in those tables and to read probabilities from those tables. Other, non-binary bit generators (multi-bit generators), such as Huffman or Tunstal bit generators, are also possible in some implementations.
A bit generator 216C inputs the probability value and the outcome value from probability estimator 210C, and outputs bits corresponding to the output codeword, saving fractional bits in a fractional bit storage 218C. The bit stream output by bit generator 216C forms compressed file 220.
Compressor 108 also includes a context model controller 206C which has two outputs coupled to context modeller 202C. One output provides a sameness context model mask, and the other provides a residual context model mask. If these two masks are not a priori information, the masks are included into compressed file 220, along paths 222C.
In operation, during each cycle of the pixel clock, compressor 108 accepts an input pixel (the "current" pixel) from file 200, which contains the original pixels. In response to the current pixel, compressor 108 outputs a number of bits to compressed file 220, where the number depends on the state of compressor 108, and can be zero bits (i.e. no bits output in a given input pixel cycle). In the zero bit output case, the internal state of 108 is changed. This will be reflected in a later compressed bit or bits.
Each pixel cycle might be divided into several result, or entropy, cycles. For example, when a pixel is an 8-bit quantity and the entropy coder is a binary entropy coder, each pixel cycle has eight result cycles, with a context bin value and result bit for each entropy cycle.
Context modeller 202C accepts the input pixel and outputs one or more sets each of a context bin ID and a result value. In one embodiment, the pixel is represented by a number of bits and in one entropy cycle one bit for the result value and one context bin ID are processed. In another embodiment, the result value is an 8-bit value, a single context ID is used, and the entropy coder is a multi-symbol arithmetic coder, such as is described by in Witten, H., R. Neal and J. G. Cleary, "Arithmetic coding for data compression," Comm. of the ACM, June 1987, Vol. 30, pp. 520-540.
Context modeller 202C determines the context bin ID and result, according to methods explained in more detail below. A context indicates something about the environment of the current pixel which can be determined by the decoder, such as the pixel value found to the left of the current pixel, or a combination of subcontexts such as the pixel value to the left combined with the bit plane of the result bit (e.g., the position of the result bit within the current pixel). In the case where only a few previous pixels are used, this is called a Markov model of the data.
A context model controls which attributes of the current pixel and its surroundings are used to determine the context. Because pixels are input to compressor 108 in a known order, context modeller 202C knows which frame the current pixel is from and the position of the current pixel within that frame.
Initially frame store 204C is empty, so it might not be able to provide contexts for very early pixels. However, the frame store could just be filled with an a priori value so that contexts can be provided for every result. After the first frame, frame store 204C contains at least a full frame. As frame store 204C fills, the oldest pixels are overwritten as new pixels are stored. Frame store 204C need only be large enough to hold the values needed to determine future contexts. For example, if no context referred to pixel values from earlier than the immediately prior frame, storage is only needed for one full frame. In some embodiments, the frame store already exists, so no additional memory is required.
The context bin ID output by context modeller 202C indicates the context of the current pixel as well as a mode selected from a sameness mode and a residual mode. Of course, by proper assignment of nonoverlapping context bin ID's only a context bin ID need be output. Except for the separation of conditional probabilities into two context tables, the operation of probability estimator 210C is similar to that of a conventional probability estimator. Of course, if sameness context bin ID's are distinguishable from residual context bin ID's, probability estimator 210C can be implemented using only one table, with a number of entries equal to the sum of the number of sameness contexts and residual contexts.
Once the context and the result are output to probability estimator 210C, a probability estimate (outcome) is transferred to bit generator 216C. In a binary entropy coder, the outcome indicates whether or not the result was the most probable symbol. Because of this, the probability estimate is always 0.5 or greater. In a multi-symbol arithmetic coder, the outcome might be an estimate of the probability of all the symbols in a list coming before the result.
After the probability estimate and outcome are sent to bit generator 216C, the result is used by probability estimator 210C to update the probability estimate. Following this update, the probability estimate is ready for the next occurrence of this context bin ID, but it is only based on information available at decode time (i.e., it is casual).
Bit generator 216C uses the outcome provided by probability estimator 210C and the probability estimate of that result to alter the internal state or states of bit generator 216C and output compressed bits if appropriate. In some embodiments, bit generator 216C is a bit generator such as the B-coder shown in U.S. Pat. No. 5,272,478 issued to Allen, et al. and assigned to the assignee of the present invention. In some embodiments, entropy coder 208C is an entropy coder such as the Q-coder developed by IBM of New York, or the ABS coder of Allen et. al. of Ricoh U.S. Pat. No. 5,381,145, issued Jan. 10, 1995.
FIG. 3 shows decompressor 122 in more detail, having many of the same elements as compressor 108. To distinguish similar elements of decompressor 122 and compressor 108, the elements of decompressor 122 are indicated by similar numbers but with a "D" suffix instead of a "C" suffix, such as context modeller 202D, frame store 204D, context model controller 206D and entropy decoder 208D comprising probability estimator 210D, context tables 212D, 214D, bit generator 216D and fractional bit storage 218D. Several differences between decompressor 122 and compressor 108 are worth noting.
In decompressor 122, the context bin ID is determined using pixels from the frame store, and context modeller 202D provides the so determined context bin ID to probability estimator 210D. Probability estimator 210D determines a probability for the most probable symbol, in the case of a binary entropy coder, and a probability distribution in the case of a multi-symbol arithmetic coder. Bit generator 216D then uses this probability information, along with fractional bit storage 218D and the compressed bit stream to determine the outcome. This outcome is coupled back to probability estimator 210D and is typically the same outcome which was passed from probability estimator 210C in the compression process. The bit generator then updates its fractional bit storage 218D.
The probability estimator uses the outcome to determine the result. This is typically the same result originally determined by context modeller 202C when encoding. The probability estimator passes this result to context modeller 202D and then updates context memory 212D or 214D matching the context bin ID. The context modeller uses the result to update the frame store, produce original pixels, and determine the next context bin ID. Context model controller 206D operates the same way as context model controller 206C.
With systems that both compress and decompress, some elements, such as the context model controller and the frame store, only occur once and serve both the compressor and the decompressor.
FIG. 4 is a more detailed block diagram of context modeller 202C. The details of context modeller 202D are similar, although they are not shown in the drawings. As shown in FIG. 4, context modeller 202C comprises a pixel register 402 for holding the current pixel, control logic 404C for implementing the precoding process shown in FIG. 6, a bit plane (BP) register 406 for indicating which bit of the current pixel is currently being processed if bit planes are processed separately, a cursor position (CP) register 408 for holding the position of the current pixel, a comparator 410 for generating sameness signals, a full context register 412, two context masks, RMASK and SMASK, and an update buffer 414.
The interconnections within context modeller 202C are as follows. Pixel register 402 has an input for the current pixel and a clock input to accept the pixel clock PCLK. Pixel register 402 outputs the current pixel to control logic 404C, comparator 410 and update buffer 414. Control logic 404C also has a clock input for PCLK, as well as inputs for the current pixel and a result of the test X==T (explained below). Control logic 404C has outputs for a bit plane indicator (provided to BP register 406), an update clock (UCLK) for clocking update buffer 414, a mode selector for selecting one mask of RMASK and SMASK, and an output for a result value. The RMASK mask is active in a residual mode, while the SMASK mask is active an a sameness mode. The active mask is used to mask full context register 412 to form a current context. The result output of control logic 404C is the result output of context modeller 202C.
The update clock clocks update buffer 414 to update frame store 204C after the context for the current pixel is obtained. Of course, if frame store 204C has enough space to hold the current pixel without overwriting any pixels which form the context for the current pixel, then PCLK can be substituted for UCLK.
BP register 406, comparator 410, frame store 204C, and CP register 408 each provide bits or pixels to full context register 412. The contents of register 412 are then masked by the mask indicated by the mode, and the masked context is output as the context bin ID output by context modeller 202C, as explained in more detail in FIG. 5 and accompanying text below. RMASK and SMASK include inputs to allow different masks to be loaded from context model controller 206C.
The operation of context modeller 202C during one pixel clock (PCLK) cycle will now be described. First, the current pixel is read into pixel register 402. CP register 408 "addresses" frame store 204C to obtain the context pixels for the current pixel. An exemplary context model is one where the pixel to the left of the current pixel forms the context. In this case, the pixel to the left would be read out of frame store 204C, with CP register 408 indicating where the current pixel is, and thus where the "pixel to the left" is to be found. Some of the context pixels are compared by comparator 410 to one another and to the current pixel. As shown in FIG. 4, the current pixel (designated "X") is compared to the pixel in the immediately previous frame which occupies the same pixel position as the current pixel does in the current frame (designated "T"). The result of this comparison is provided to control logic 404C. The results of other comparisons, such as the pixel to the left compared with the corresponding pixel from a previous frame, are provided to full context register 412.
FIG. 5 shows one possible arrangement of full context register 412 and the context masks (which are not shown in corresponding scale in FIG. 5 as they are in FIG. 4; nonetheless, the correspondence of bits in the register and the masks is apparent given this specification and the Figures). Context pixels are pixels relative to the current pixel, thus they are different for each pixel. In FIG. 5, the current pixel is labelled "X", the pixel to the left of X is labelled "H", the pixel just above X in the same vertical column is labelled "V", and the pixel diagonally to the upper left of X is labelled "D". Pixels which are nearby X, but further away than H, V or D, are labelled H1, H2, H3, V1, V2, D1, D2, etc. So that the current pixel is decodable, pixels to the right and below are not used for context since, as indicated above, the image is sequentially compressed from top to bottom and from left to fight and decompressed in the same order.
The context pixels might be drawn from more than one frame. These multiple frames are shown as the current frame (C), the immediately previous frame (P), the immediately upcoming frame (N), the frame following N (2N), etc. Full context register 412 is shown with 46 bits for possible inclusion in the context model. In practice, not all 46 bits affect the context, because the resulting number of context bins (2 46) is too large to be practical. Table 1 shows several sameness context models for one example, along with the values for SMASK. Of course, depending on the implementation, more or less than 46 bits could be used and/or different context models could be used.
TABLE 1______________________________________Sameness Context Models # ofModel Sameness Context Contexts SMASK (in hex)______________________________________0 Single mode 0 0 00 00-00-00-001 No separate contexts 1 0 00 00-00-00-002 T 2 8 0 00 FF-00-00-003 H 2 8 0 00 00-FF-00-004 Same(H, V, D) 2 3 0 49 00-00-00-005 Same(H, H1, V, V1, D) 2 5 0 CD 00-00-00-006 Same(H, H1, H2, H3, 2 8 0 FF 00-00-00-00 V, V1, V2, D)7 H, Same(H) 2 9 0 80 00-FF-00-008 T, Same(H) 2 9 0 80 FF-00-00-009 T, H 2 16 0 00 FF-FF-00-0010 T, H, Same(H) 2 17 0 80 FF-FF-00-00______________________________________
In Table 1, for brevity, the function S(a) is used to indicate the result of a sameness test, a==ap, where the subscript p is used to indicate a pixel or bit from a previous frame. T is used in place of Xp. Model 0 does not use sameness coding, but is included for comparison. Model 1 uses sameness coding, but does not use separate sameness contexts.
FIG. 6 is a flow chart of the process followed by context-modeller 202C to convert the current pixel into a result and a context for that result. First, context model controller 206C determines the sameness context model and the residual context model and loads SMASK and RMASK (step C1). Once those are set, control logic 404C cycles the pixel clock to load the current pixel into pixel register 402 (step C2). In some embodiments, control logic 404C adaptively changes the masks in a causal manner.
Next, the sameness context is determined (step C3) by updating full context register 412 and masking with SMASK. If dynamic (adaptive) context modelling is used, the dynamic context model is determined first (step C3'). With the current pixel being X, the sameness test X==T is done (C4), and if that test result is true, a result value of 1 is output (C5) along with the sameness context of the current pixel. The sameness test tests whether or not the current pixel is the same as the corresponding pixel from a previous frame (i.e., whether the color of the current pixel changes from the previous frame). This test is represented by X==T and is performed by comparator 410, which reads T from frame store 204C and X from pixel register 402. If X==T is true, no other information about the current pixel needs to be output.
If X==T is not true, the negative test result (0) is output as the result with the sameness context of the current pixel (C6). Because only one sameness result is output per pixel, bit plane position is not part of the sameness context. If the sameness test indicates X and T are different, context modeller 202C must now output an indication of the value of X. This is referred to herein as residual coding. The sameness test is generalizable beyond just temporal sameness of a pixel and a pixel from a prior frame, but when the test is X==T, the sameness mode can be referred to as a temporal mode and the residual mode can be referred to as a nontemporal mode.
In the residual mode, the original pixel is output one bit at a time. To do this, control logic 404C initializes BP register 406 to point to the first bit plane (C7), determines the residual context for the current pixel and current bit plane (C8), and outputs b(BP, X) as the result (C9), where b0 is a function which extracts the bit of X which is in bit plane BP. Because the residual contexts are preceded by "0" and sameness contexts are preceded by "1", the entropy coder accepting the context and result outputs can differentiate between results of a sameness test and residual results.
After the residual bit output, the bit plane is compared to the number of bit planes (N BP), to check if it is the last bit plane (C10). If more bit planes remain, the BP register is incremented (C11), and the process repeats at step C8. Otherwise, the process continues at step C12, where a test is done to check if any more pixels remain to be compressed. This step also follows step C5. If more pixels remain to be processed, control logic 404C cycles UCLK to update frame store 204C (C13) and then cycles PCLK to get the next pixel (C14). If no more pixels remain, the process terminates (C15).
While the above description and FIG. 6 describe residual result outputs suited for a binary coder, the adjustments to accommodate an M-ary coder are straightforward, such as eliminating the BP register and outputting only one residual result per pixel when X is not equal to T (none need be output when X and T are equal).
Examples of different residual context models are shown in Table 2. Bit plane coding uses three bits of context to indicate the current bit plane, whereas simulated M-ary coding uses 255 contexts based on bits from prior bit planes (as described by Zandi). For simplicity, the number of contexts required for M-ary coding is rounded to 256 in Table 2.
TABLE 2______________________________________Residual Context Models # ofModel Residual Context Contexts______________________________________0 M-ary 2 81 BP, b(BP,H,H1,H2,H3,V,V1,V2,D,D1,D2) 2 132 M-ary, H 2 163 M-ary,T 2 164 BP, b(BP,H,H1,H2,V,V1,V2,D,D1) 2 11______________________________________
In Table 2, BP refers to the current bit plane value, and the function b0 refers to the values of the bits from the bit plane BP for the parameter pixels. The values for RMASK for each residual context model can be easily determined in the same manner as the SMASK values in Table 1.
FIG. 7 is a flow chart of the decompression process which is described with reference to FIG. 3 as well as FIG. 7. This process is performed by decompressor 122, including context modeller 202D. Context modeller 202D is similar to context modeller 202C, except that context modeller 202D inputs a result and outputs an input, thus requiting different control logic.
The decompression process begins when a sameness context model and a residual context model are determined (step D1). As should be apparent, if the sameness context model and the residual context model are fixed throughout an application, the context model controllers are not needed. If several context models are used, they can either be deterministically based on prior data or they can be inserted into compressed file 220 along with the compressed data. The context model information is provided to compressed file 220 along path 222C (shown in FIG. 2) during the compression process, and is extracted along path 222D in the decompression process.
Context modeller 202D then determines the current sameness context (step D2), and outputs this to probability estimator 210D (step D3). If dynamic context model reconfiguration was used to compress, the context model is reconfigured during decompression before step D2 (step D1'). With the context information, probability estimator 210D can output a probability for that context to bit generator 216D, which uses that information to determine how many bits to read from the compressed image, and uses that information to determine a consistent outcome from the bits read and the probability. Bit generator 216D outputs the outcome value to probability estimator 210D, which converts the outcome to a result, updates its probability table for the current context and outputs the result to context modeller 202D (step D4). Because of the ordering of the compressed image, the first context is known to be a sameness context.
Context modeller 202D checks the result (D5). If it is 1, indicating that the current pixel X was the same as T, context modeller 202D reads T from frame store 204D and outputs T as the current pixel (D6). Context modeller 202D then checks for more pixels (D7). If there are more pixels, frame store 204D is updated with pixel X (D8), otherwise the process ends (D9).
If the sameness result at step D5 is 0, indicating that the current pixel is different than T, context modeller 202D then goes into a residual mode, where it is expecting residual results to follow the negative sameness result. In the residual mode, the first bit plane is processed by setting the current bit plane (BP) equal to the first bit plane (D10), determining the residual context for the current bit plane (D11), outputting that context to probability estimator 210D (D12), obtaining a result from probability estimator 210D (D13), and outputting that result as b(BP, X), i.e. the BP-th bit of X. The bits can be output separately or buffered until the entire pixel value is available.
After the result for one bit plane is obtained, if the control logic determines there are more bit planes (D15), then BP is incremented (D16) and the process continues back to step D11. Otherwise, the current pixel is output (D17), and the control logic goes to step D7 to check for more pixels.
The figures have now been described. In summary, using the system shown therein, data is compressed before being passed through a limited channel, and is decompressed by the eventual user. The example above referred to compressing data which is a sequence of frames, each frame being a digitized image. The compressor uses an entropy coder to compress the frames, and a context modeller provides contexts for the current pixel or the current bit of the current pixel depending on a mode. If the current pixel is the same as the pixel used for a sameness context, the sameness result is indicated in a sameness mode to the entropy coder and no other information about the current pixel need be provided, except a sameness context for that result if more than one sameness context is used.
In the above example, the pixel used for the sameness test is a pixel from a prior frame in the same position as the current pixel, thus the sameness is a temporal sameness. If the sameness test is negative, i.e., the pixels are different, the compressor switches to a residual mode, where the current pixel is provided to the entropy coder along with one ore more residual contexts and residual results.
The decompressor decompresses the frames by determining the context for the current pixel and then decoding the current pixel from the bit stream. A context model controller is provided to allow for varying context models. If the context model is varied, then the particular context model used can be included as part of the compressed data.
Several tests were done to determine the relative performance of using sameness information in the compression process. For this test, three palettized frame sequences were used. The first sequence is an sequence showing text moving over a solid background and uses only three different colors. The second sequence shows a ray-traced sphere moving in front of a stationary checker board pattern, and uses a large number of different colors. The third is a digitized clip of an animated movie, which uses 252 different colors and has several scene changes within the clip. The digitized clip includes noise introduced in the acquisition process. Table 3 shows the compressibility of these three sequences, using sameness coding and not using sameness coding. The sameness test used is the temporal test.
TABLE 3______________________________________Compression ResultsBit Rate/Compression Text Image Ray-Traced Movie______________________________________Non-samenessBits/Pixel: 0.111 0.596 1.818Compression Ratio: 72:1 13.4:1 4.40:1SamenessBits/Pixel: 0.030 0.130 1.835Compression Ratio: 267:1 61.5:1 4.36:1______________________________________
As Table 3 shows, sameness coding can improve the compression of many sequences. While the movie sequence was not very compressible in either case, a typical high-quality sequence either generated or digitized with little noise, is expected to yield results between that of the ray-traced sequence and the acquired movie sequence.
Further tests were done on these three sequences to determine the best sameness context models and residual models to use. The results for Table 3 were obtained using the sameness context model and the residual context model which provided the best performance (sameness context models are meaningless for the non-sameness coding). For the text sequence, contexts based on the previous frame pixel T and M-ary coding of the current pixel (residual model 3 from Table 2) worked best in both the sameness and non-sameness coding. In the sameness coding, sameness model 6 (see Table 1) worked best of all the sameness models, regardless of the residual coding used, and the combination of these two worked best overall.
For both the ray-traced sequence and the movie sequence, sameness context 10 tended to work the best for sameness coding, however, in each case, the less complex sameness model, model 6, with only 2 8 contexts performed nearly as well as the more complex sameness model, model 10, with 2 17 contexts.
The results of the tests are shown in tables 4-6, which tabulate the bit rates for compression of the three sequences (bit rate of 8.0 for uncompressed images) using each of the sameness context models and the residual context models. The best result for each sameness model is indicated by an asterisk ("*") and the best result for each of residual model is indicated by a cross ("†"). As indicated in Table 1, sameness model 0 is the nontemporal case. Although it has not been tested, the use of palette reordering as taught by Zandi should improve the compression for bit plane residual coding (models 1 and 4).
TABLE 4______________________________________Bit Rates for Text Sequence (units: bits/pixel)Same-ness Residual Coding ModelModel 0 1 2 3 4______________________________________0 0.412161 0.193621 0.135616 †0.111391 0.2040141 0.177835 0.198109 0.164097 †0.157565 0.2001712 0.131613 0.151887 0.117875 †0.111343 0.1539483 0.166009 0.186283 0.152271 †0.145739 0.1883444 0.059420 0.079695 0.045681 †0.039149 0.0817575 0.057181 0.077455 0.043443 †0.036911 0.0795166 *0.050442 *0.070716 *0.036704 *†0.030172 *0.0727777 0.068909 0.089183 0.055171 †0.048639 0.0912448 0.068082 0.088356 0.054344 †0.047812 0.0904179 0.081577 0.101851 0.067839 †0.061307 0.10391210 0.059190 0.079463 0.045451 †0.038921 0.081525______________________________________
TABLE 5______________________________________Bit Rates for Ray-Traced Sequence (units: bits/pixel)Same-ness Residual Coding ModelModel 0 1 2 3 4______________________________________0 6.198752 0.753652 0.595772 †0.260222 0.7863171 0.405009 0.294170 †0.287095 0.292788 0.2994952 0.372193 0.261355 †0.254280 0.259972 0.2666793 0.394434 0.283596 †0.276520 0.282213 0.2889204 0.278253 0.167359 †0.160339 0.166032 0.1726945 0.270049 0.159210 †0.152135 0.157828 0.1645356 0.257286 0.146448 †0.139372 0.145065 0.1517727 0.320315 0.209476 †0.202401 0.208093 0.2148008 0.316335 0.205497 †0.198421 0.204114 0.2108219 0.257949 0.147111 †0.140035 0.145728 0.15243510 *0.247979 *0.137141 *†0.130065 *0.135758 *0.142465______________________________________
TABLE 6______________________________________Bit Rates for Movie Sequence (units: bits/pixel)Same-ness Residual Coding ModelModel 0 1 2 3 4______________________________________0 5.945661 2.988204 *†1.817502 3.178031 3.0118701 4.581269 3.136999 †2.250583 3.278456 3.1494222 4.480807 3.036537 †2.150121 3.177994 3.0489593 4.501576 3.057305 †2.170890 3.198763 3.0697284 4.336257 2.891990 †2.005567 3.033439 2.9044125 4.318405 2.874134 †1.987719 3.015592 2.8865576 4.299738 2.855468 †1.969053 2.996925 2.8678917 4.356513 2.912243 †2.025827 3.053700 2.9246668 4.335770 2.891500 †2.005084 3.032957 2.9039239 4.171252 2.726982 †1.840567 2.868440 2.73940510 *4.166172 *2.721901 †1.835486 *2.863359 *2.734324______________________________________
The above description is illustrative and not restrictive. Many variations of the invention will become apparent to those of skill in the art upon review of this disclosure. The scope of the invention should, therefore, be determined not with reference to the above description, but instead should be determined with reference to the appended claims along with their full scope of equivalents.
|Cited Patent||Filing date||Publication date||Applicant||Title|
|US4717956 *||Aug 20, 1985||Jan 5, 1988||North Carolina State University||Image-sequence compression using a motion-compensation technique|
|US5298992 *||Oct 8, 1992||Mar 29, 1994||International Business Machines Corporation||System and method for frame-differencing based video compression/decompression with forward and reverse playback capability|
|US5313204 *||Apr 20, 1992||May 17, 1994||Mitsubishi Denki Kabushiki Kaisha||Encoding and decoding devices with predictor and detector|
|US5414423 *||Apr 29, 1993||May 9, 1995||International Business Machines Corporation||Stabilization of probability estimates by conditioning on prior decisions of a given context|
|US5422724 *||Aug 31, 1993||Jun 6, 1995||Applied Materials, Inc.||Multiple-scan method for wafer particle analysis|
|US5442458 *||Dec 18, 1991||Aug 15, 1995||Eastman Kodak Company||Method and associated apparatus for encoding bitplanes for improved coding efficiency|
|US5471207 *||Feb 23, 1994||Nov 28, 1995||Ricoh Company Ltd.||Compression of palettized images and binarization for bitwise coding of M-ary alphabets therefor|
|US5550540 *||Nov 12, 1992||Aug 27, 1996||Internatioal Business Machines Corporation||Distributed coding and prediction by use of contexts|
|Citing Patent||Filing date||Publication date||Applicant||Title|
|US5848194 *||Dec 15, 1995||Dec 8, 1998||Canon Kabushiki Kaisha||Coding/decoding apparatus and coding/decoding method|
|US5859604 *||Jan 14, 1997||Jan 12, 1999||International Business Machines Corporation||Merged VLSI implementation of hardware optimized Q-Coder and software optimized QM-Coder|
|US5986594 *||Sep 9, 1997||Nov 16, 1999||Canon Kabushiki Kaisha||Image compression by arithmetic coding with learning limit|
|US6072909 *||Oct 15, 1996||Jun 6, 2000||Fuji Xerox Co., Ltd.||Image coding devise and image decoding devise using with image disassembly|
|US6118900 *||Sep 15, 1999||Sep 12, 2000||Fuji Xerox Co., Ltd.||Image coding device and image decoding device for use with image disassembly|
|US6181435 *||Jul 1, 1997||Jan 30, 2001||Canon Kabushiki Kaisha||Image forming method and apparatus|
|US6188795 *||Jun 12, 1997||Feb 13, 2001||Dublin City University||Data compression|
|US6285790 *||Apr 15, 1997||Sep 4, 2001||Ricoh Company, Ltd.||Data compression for indexed color image data|
|US6490373 *||May 1, 2001||Dec 3, 2002||Matsushita Electric Industrial Co., Ltd.||Apparatus and method of decoding an image using a statistical model based on pixels|
|US6510250 *||May 1, 2001||Jan 21, 2003||Matsuhita Electric Industrial Co., Ltd.||Apparatus and method of decoding an image using a statistical model based on pixels|
|US6522783||Nov 23, 1999||Feb 18, 2003||Sharp Laboratories Of America, Inc.||Re-indexing for efficient compression of palettized images|
|US6760480||Nov 13, 2002||Jul 6, 2004||Matsushita Electric Industrial Co., Ltd.||Apparatus and method of encoding an image using a statistical model based on pixels|
|US6850175 *||Sep 18, 2003||Feb 1, 2005||Ntt Docomo, Inc.||Method and apparatus for arithmetic coding|
|US6892109||Nov 20, 2001||May 10, 2005||Canon Kabushiki Kaisha||Remote maintenance system|
|US6950445 *||Mar 21, 2001||Sep 27, 2005||Telefonaktiebolaget Lm Ericsson (Publ)||Communication system and method for shared context compression|
|US6963786||Nov 20, 2001||Nov 8, 2005||Canon Kabushiki Kaisha||Remote maintenance system|
|US6967601||Oct 18, 2004||Nov 22, 2005||Ntt Docomo, Inc.||Method and apparatus for arithmetic coding, including probability estimation state table creation|
|US7058231 *||Jun 1, 2004||Jun 6, 2006||Electronics For Imaging, Inc.||Methods and apparatus for data compression with a hybrid context|
|US7062343||Apr 29, 2005||Jun 13, 2006||Canon Kabushiki Kaisha||Remote maintenance system|
|US7221347 *||Nov 20, 2002||May 22, 2007||Samsung Electronics Co., Ltd.||Apparatus and method to improve a response speed of an LCD|
|US7319417 *||Nov 18, 2005||Jan 15, 2008||Intel Corporation||Compression using multiple Markov chain modeling|
|US7359439 *||Oct 8, 1998||Apr 15, 2008||Pixel Tools Corporation||Encoding a still image into compressed video|
|US7400277 *||Apr 6, 2004||Jul 15, 2008||International Business Machines Corporation||Method and system for the compression of probability tables|
|US7460721||May 4, 2006||Dec 2, 2008||Electronics For Imaging, Inc.||Methods and apparatus for data compression with a hybrid context|
|US7511844 *||Sep 23, 2003||Mar 31, 2009||Brother Kogyo Kabushiki Kaisha||Image forming device and image forming method|
|US7705754 *||Jun 25, 2008||Apr 27, 2010||International Business Machines Corporation||Method and system for the compression of probability tables|
|US7805279||May 23, 2006||Sep 28, 2010||Canon Kabushiki Kaisha||Remote maintenance system|
|US7822283||Apr 23, 2003||Oct 26, 2010||Ntt Docomo, Inc.||System and method for arithmetic encoding and decoding|
|US7865025 *||Aug 1, 2006||Jan 4, 2011||Ching-Wei Yeh||Data processing method in embedded block coding with optimized truncation module|
|US7912324||Apr 28, 2006||Mar 22, 2011||Ricoh Company, Ltd.||Orderly structured document code transferring method using character and non-character mask blocks|
|US8111259 *||Jun 29, 2007||Feb 7, 2012||Marvell International Ltd.||Image processing apparatus having context memory controller|
|US8294720||Nov 2, 2011||Oct 23, 2012||Marvell International Ltd.||Image processing apparatus having context memory controller|
|US8526062 *||Apr 14, 2008||Sep 3, 2013||Xerox Corporation||Color lookup table compression|
|US8531468||Sep 14, 2012||Sep 10, 2013||Marvell International Ltd.||Image processing apparatus having context memory controller|
|US9577667||Sep 30, 2009||Feb 21, 2017||Ntt Docomo, Inc.||System and method for arithmetic encoding and decoding|
|US20020057716 *||Mar 21, 2001||May 16, 2002||Krister Svanbro||Communication system and method for shared context compression|
|US20030177255 *||Mar 13, 2002||Sep 18, 2003||Yun David C.||Encoding and decoding system for transmitting streaming video data to wireless computing devices|
|US20030193460 *||Nov 20, 2002||Oct 16, 2003||Samsung Electronics Co., Ltd.||Apparatus and method to improve a response speed of an LCD|
|US20040064792 *||Sep 23, 2003||Apr 1, 2004||Brother Kogyo Kabushiki Kaisha||Image forming device and image forming method|
|US20040208383 *||Apr 23, 2003||Oct 21, 2004||Bossen Frank Jan||System and method for arithmetic encoding and decoding|
|US20040223654 *||Jun 1, 2004||Nov 11, 2004||Peters Michael Alan||Methods and apparatus for data compression|
|US20050197727 *||Apr 29, 2005||Sep 8, 2005||Canon Kabushiki Kaisha||Remote maintenance system|
|US20050231401 *||Apr 6, 2004||Oct 20, 2005||Perrone Michael P||Method and system for the compression of probability tables|
|US20050271384 *||Oct 18, 2004||Dec 8, 2005||Lee Han H||Optical transmission line monitoring system using a gain clamped optical amplifier|
|US20060282188 *||May 23, 2006||Dec 14, 2006||Canon Kabushiki Kaisha||Remote maintenance system|
|US20070115148 *||Nov 18, 2005||May 24, 2007||Xiaolin Wu||Compression using multiple Markov chain modeling|
|US20080031532 *||Aug 1, 2006||Feb 7, 2008||Ying-Jie Xu||Data processing method in embedded block coding with optimized truncation module|
|US20080252499 *||Jun 25, 2008||Oct 16, 2008||International Business Machines Corporation||Method and system for the compression of probability tables|
|US20090257072 *||Apr 14, 2008||Oct 15, 2009||Klassen R Victor||Color lookup table compression|
|US20100014581 *||Sep 30, 2009||Jan 21, 2010||Ntt Docomo, Inc.||System and method for arithmetic encoding and decoding|
|DE19606178C2 *||Feb 20, 1996||Jun 13, 2002||Ricoh Kk||Verfahren zum Komprimieren einer Anordnung von Pixelwerten und zum Dekomprimieren einer Anordnung von Pixelwerten aus einem komprimierten Datensatz|
|WO2003091942A1 *||Apr 23, 2003||Nov 6, 2003||Docomo Communications Laboratories Usa, Inc.||System and method for arithmetic encoding and decoding|
|U.S. Classification||382/239, 341/107, 375/E07.264, 375/E07.255, 348/415.1, 382/232, 382/233, 382/236|
|International Classification||H04N7/36, G06T9/00, H04N7/26|
|Cooperative Classification||H04N19/507, H04N19/503|
|European Classification||H04N7/36D2, H04N7/36|
|Feb 6, 1995||AS||Assignment|
Owner name: RICOH COMPANY LIMITED, JAPAN
Free format text: ASSIGNMENT OF ASSIGNORS INTEREST;ASSIGNORS:GORMISH, MICHAEL J.;BOLIEK, MARTIN P.;REEL/FRAME:007346/0428
Effective date: 19950125
Owner name: RICOH CORPORATION, CALIFORNIA
Free format text: ASSIGNMENT OF ASSIGNORS INTEREST;ASSIGNORS:GORMISH, MICHAEL J.;BOLIEK, MARTIN P.;REEL/FRAME:007346/0428
Effective date: 19950125
|Apr 26, 2001||FPAY||Fee payment|
Year of fee payment: 4
|Apr 19, 2005||FPAY||Fee payment|
Year of fee payment: 8
|Apr 15, 2009||FPAY||Fee payment|
Year of fee payment: 12