To quickly realize encoding processing in image data, in which plural changing points are present without depending on the operating clock of a device by inputting an image data stream of m bits, and outputting pixel changing points at which pixels are changing, and inputting and decomposing this output into the maximum n pieces of runs.
A changing point detecting circuit 1 detects the changing points of pixels from an image data stream of m bits from an inputted 0-th bit to (m-1)-th bit, and outputs the changing point data. A run decomposing circuit 2 inputs the changing point data from the changing point detecting circuit 1 and decomposes the image data stream of m bits having the maximum n pieces of changing points into the maximum n pieces of runs, and outputs the run decomposed data. A run length calculating circuit 3 inputs the run decomposed data from the run decomposing circuit 2, and calculates the maximum n pieces of run length in parallel. Thus, once the changing points of the pixels are detected, the image data stream is immediately decomposed into m×n matrix run, so that the run length of white pixels or black pixels can be calculated at high speed.
MIYOSHI TAKAHIRO