Embodiments of the invention provide a run length coding instruction for
determining output context and decision values. Pixel coefficient bit
values are used after wavelet transformation to determine output context
(CX) and decision (D) values. The input is comprised of coefficient bit
values (bit1, bit2, bit3, bit 4) in accordance with the scan order and
the output are CX and D values. The CX and D pairs are processed together
by arithmetic encoder to produce compressed data output (CD). CX selects
the probability estimate to use during the coding of D.