Methods, systems, and computer programs for encoding images are described.
In one aspect, quantized frequency domain vectors are sequentially
generated from a sequence of blocks of the image. Each quantized
frequency domain vector includes a set of quantized forward transform
coefficients that are derived from a respective image block. For each
successive quantized frequency domain vector, a current input capacity
level of a buffer is determined and the quantized frequency domain vector
is modified to increase compressibility when the current input capacity
level is determined to be below a prescribed threshold. Modified and
unmodified quantized frequency domain vectors are encoded into a sequence
of encoded image blocks. The sequence of encoded image blocks is stored
in the buffer.