×

Method and apparatus for real-time lossless compression and decompression of image data

  • US 5,408,542 A
  • Filed: 05/12/1992
  • Issued: 04/18/1995
  • Est. Priority Date: 05/12/1992
  • Status: Expired due to Term
First Claim
Patent Images

1. A method for compressing a block of color image data to create a compressed data stream comprised of encoded control blocks and color value data, said method comprising the steps of:

  • A) generating a control block having a type field, a count field and a flag field, said control block being associated with a particular color list;

    B) obtaining a current pixel block from said block of color image data, said current pixel block including a plurality of pixels having a plurality of colors;

    C) generating a current color list corresponding to said current pixel block, said current color list identifying said plurality of colors;

    D) generating a current pixel map, said current pixel map indicating a correspondence between said plurality of pixels and said plurality of colors;

    E) providing a plurality of color caches for storing a plurality of color lists, wherein said plurality of color lists are stored in said plurality of color caches based upon the number of colors represented in each of said plurality of color lists;

    F) comparing said current color list to said particular color list associated with said control block to determine a match; and

    G) if said current color list matches said particular color list associated with said current color block, thenG1) incrementing the count field of said current block; and

    G2) outputting as part of said compressed data stream said current pixel map;

    H) if said current color list does not match said particular color list associated with said control block, thenH1) identifying a selected color cache of said plurality of color caches, the selected color cache being a color cache that stores color lists that represent the same number of colors as are represented in said current color list;

    H2) comparing said current color list to one or more color lists from said selected color cache to determine if said current color list matches a color list of said one or more color lists stored in said selected color cache;

    H3) if said current color list matches said color list of said one or more color lists stored in said selected color cache, then encoding said current pixel block byH3a) generating a new control block, said new control block having a flag field and a type field;

    H3b) creating a reference to said color list of said one or more color lists stored in said selected color cache by setting the flag field in said new control block indicating that said current color list matches one or more color lists stored in said plurality of color caches,H3c) setting the type field in said new control block corresponding to the number of colors in said current color list, andH3d) outputting as part of said compressed data stream said control block and an index to said color list of said one or more color lists stored in said selected color cache; and

    H3e) outputting as part of said compressed data stream said current pixel map;

    H4) if said current color list does not match one of said one or more color lists stored in said selected color cache, then encoding said current pixel block byH4a) generating a new control block, said new control block having a type field;

    H4b) setting the type field of said new control block to a value corresponding to the number of colors in said current color list,H4c) outputting as part of said compressed data stream said new control block, said current color list and said current pixel map, andH4d) entering said current color list into said selected color cache.

View all claims
  • 2 Assignments
Timeline View
Assignment View
    ×
    ×