An adaptive entropy coder is coupled with a localized conditioning context to
provide efficient compression of images with localized high frequency variations.
In one implementation, an arithmetic coder can be used as the adaptive entropy
coder. The localized conditioning context includes a basic context region with
multiple context pixels that are adjacent the current pixel, each of the context
pixels having an image tone. A state is determined for the basic context region
based upon a pattern of unique image tones among the context pixels therein. An
extended context region that includes the basic context region is used to identify
a non-local trend within the context pixels and a corresponding state. A current
pixel may be arithmetically encoded according to a previously encoded pixel having
the same tone or as a not-in-context element. In one implementation, a not-in-context
element may be represented by a tone in a color cache that is arranged as an ordered
list of most recent not-in-context values.