摘要 |
A prediction error calculation part calculates a prediction error for each input data. A prediction error encoding part generates a prediction error code by encoding the value of the prediction error. A run-length counting part counts the run-length of the prediction error. When the value of the prediction error changes, a run-length encoding part generates a run-length code by encoding the run-length counted. A code connecting part generates a connected code by connecting the run-length code to the prediction error code of a corresponding prediction error. When the value of the prediction error is a particular value, a prediction error checking part selects a connected code for the prediction error, as an output code. When the value of the prediction error is a different value, the prediction error checking part selects a prediction error code for the prediction error, as an output code. A code output part outputs the output code selected. |