Patent ID: 7587092

Claim:
A method for selecting conditioning states to be used in a context model for coding a source, comprising: storing in a memory the method for selecting conditioning states to be used in the context model for coding the source; processing on a processor the method for selecting conditioning states to be used in the context model for coding the source; recognizing a plurality of potential conditioning states; partitioning the plurality of potential conditioning states into groups of conditioning states according to a rule, at least one of the groups including a plurality of conditioning states, wherein the potential conditioning states includes one of: a plurality of original conditioning states representing possible combinations of context events; and a plurality of quantized conditioning states quantized from the potential conditioning states or a plurality of previously quantized conditioning states; selecting at least one of the groups of conditioning states to be used in the context model; and forming a plurality of layers by: collecting the conditioning states in a layer; and quantizing at least a portion of the conditioning states in the layer to create a next layer of collective conditioning states, wherein quantizing the conditioning states in the layer to create the next layer includes: quantizing each of a plurality of pairs of conditioning states in the layer as a collective conditioning state in the next layer; when there is a remaining conditioning state in the layer after each of the pairs of conditioning states have been quantized, including the remaining conditioning state in the next layer; and outputting the selected conditioning states to be used in the context model for coding a source.