It is an object to encode an image signal or a shape signal more efficiently than the prior art. As a means to accomplish the object, the change pixel detector 2 receives the input signal 1 as an input signal and detects the pixel which changes the two-valued pixel value. Further, the change pixel predictor 4 also reads out the reference image stored in the memory 3, and predicts the change pixel of the particular input signal. The difference value calculator 5 subtracts the output of the change pixel predictor 4 from the output of the change pixel detector 2. The difference value rounder 7 compares the tolerance value e and the prediction error D, and outputs x which requires the minimum bit number for being encoded in the value DexDe. The output of the difference value rounder 7 is encoded by the decoder 8 to become the encoded signal 9. Also, the output of the difference value rounder 7 is added in the difference value adder 11 to the predicted pixel 4 of the predicted pixel predictor 4, whereby the change pixel is calculated, and in the change pixel decoder 10, the respective pixels from the already decoded pixel indicated by the change pixel predictor 4 to the change pixel is decoded to be stored in the memory 3. 展开▼