A method, apparatus, and carrier medium to encode a series of quantized
transform coefficients. The method includes identifying events that each
includes a run of zero-valued coefficients preceding a run of one or more
non-zero-valued coefficients, and for each such event, jointly encoding
the run lengths of the preceding run of zero-valued coefficients and the
following run of non-zero-valued coefficients with a codeword, such that
for at least some events, relatively more likely-to-occur pairs of
runlengths are encoded by a shorter codeword than relatively less
likely-to-occur runlengths. The method further includes encoding each
amplitude in the run of consecutive non-zero-valued coefficients, and
encoding the signs of such coefficients. The method is applicable to
encoding a region in the series where there is likely to be a cluster of
non-zero-valued coefficients.