LOCO-I (ISO/IEC 14495-1)
:



for i = 1,2,3 and


![{ ˆs+ C [Q ] if g1 > 0
ˆs ← ˆs− C [Q ] otherwise.](index4x.png)

where β is the number of bits/pixel. This produces a projection of the residues from the dynamic range [−α + 1,α− 1] to [−α∕2,α∕2 − 1], where α = 2β is the size of the source alphabet.

After that, the residues are in the range [0,1,
,2β − 1]
![{ ˆs− C [Q ] if g > 0
ˆs ← ˆs+ C [Q ] oth1erwise.](index8x.png)

LOCO-I uses a Rice encoder that can be very redundant if the probability distributions are very narrow. To overcome this drawback, there is a special encoding mode for this situation that is triggered when a = b = c = d.
The normal mode is re-started when if s≠a or the end of a line has been reached.