Patent ID: 8107742

Claim:
An encoder for sequentially receiving an (i-1) th data block and an i th data block, each of the data blocks comprising M pixel data, and encoding an N th pixel data of the last M pixel data, the N th pixel data being belonged to the i th block data, M, N and i being positive integers, i>1, M<N≦2×M, the encoder comprising: a first difference generating unit for generating a first difference between the N th pixel data and an (N-1) th pixel data of the 2×M pixel data; a first comparing unit for determining whether the absolute value of the first difference is less than a threshold; a second difference generating unit for generating a first local difference between the N th pixel data and the local maximum pixel data of the (i-1) th data block and a second local difference between the N th pixel data and the local minimum pixel data of the (i-1) th data block, and outputting a second difference which substantially equals to one of the first and the second local differences, the absolute value of the one of the first and the second local differences being less than that of another one of the first and the second local differences; a second comparing unit for determining whether the absolute value of the second difference is less than the threshold; an encoding unit for encoding one of the first difference, the second difference and the N th pixel data into an N th encoded pixel data according to the comparing results of the first and second comparing units; and a indicating unit, for outputting an indicating signal for indicating whether the N th encoded pixel data corresponds to the (N-1) th pixel data, the local minimum pixel data of the (i-1) th data block, the local maximum pixel data of the (i-1) th data block, or the N th pixel data; wherein the function of at least one of the above units is performed by a processor.