Patent ID: 7893851

Claim:
An encoding apparatus for performing run-length encoding of signals that are to be encoded, the encoding apparatus comprising: a first storage unit that stores signals to which indexes are given in order to distinguish each of a plurality of signals that are to be encoded; a second storage unit that stores indexes of non-zero signals; a first index computing unit that computes first indexes of non-zero signals among the signals stored in the first storage unit; a second index computing unit that computes second indexes from a base index and the first indexes; a second index storage position search unit that searches for a storage position in the second storage unit in which the second indexes are to be stored, based on values of indexes stored in the second storage unit; a second index preserving unit that preserves the second index in the second storage unit, based on a storage position searched for by the second index storage position search unit; and a control unit that gives the base index to the second index computing unit, and that controls operation of each of the first index computing unit, the second index computing unit, the second index storage position search unit, and the second index preserving unit.