A method for controlling an arithmetic codec context is disclosed. The
method may include the steps of (A) reading a current value indicating
one of a first condition and a second condition corresponding to a
current context of a plurality of predetermined contexts, (B) generating
an input state matching (i) an initial state in response to the first
condition and (ii) an output state in response to the second condition,
wherein the initial state has a predetermined value and the output state
has a value generated by the method before receiving the current context
and (C) generating a current output state by performing an arithmetic
code operation on an input signal using the input state.