RS = (16 × R) + SSSS

Append EHUFSI(RS) bits

of EHUFCO(RS)

in Annex E. At the beginning of scans and restart intervals, the probability estimates used in the arithmetic coder are reset

to the standard initial value as part of the Initenc procedure which restarts the arithmetic coder. At the end of scans and

restart intervals, the Flush procedure is invoked to empty the code register before the next marker is appended.

(see F.1.4.4.1.3). A 0-decision is coded if the difference value is zero and a 1-decision is coded if the difference is not

zero. If the difference is not zero, the sign and magnitude are coded using the procedure Encode_V(S0), which is

described in F.1.4.3.1.

(EOB) binary decision is coded before coding the first AC coefficient in ZZ, and after each non-zero coefficient. If the

EOB occurs, all remaining coefficients in ZZ are zero. Figure F.5 illustrates the decision sequence. The equivalent

procedure for the Huffman coder is found in Figure F.2.