[]
        
(Showing Draft Content)

CSJ2K.j2k.entropy.encoder.MQCoder.codeSymbol

codeSymbol Method

codeSymbol(int, int)

This function performs the arithmetic encoding of one symbol. The function receives a bit that is to be encoded and a context with which to encode it.

       <p>Each context has a current MPS and an index describing what the 
       current probability is for the LPS. Each bit is encoded and if the
       probability of the LPS exceeds .5, the MPS and LPS are switched.</p>
Declaration
public void codeSymbol(int bit, int context)
Parameters
Type Name Description
int bit

The symbol to be encoded, must be 0 or 1.

int context

the context with which to encode the symbol.