a motion detecting device for enhancement of the image quality at ultra - low bit rates is disclosed , which permits quantization of the prediction error with the highest possible degree of accuracy , taking into account the amount of information which is generated by a motion vector generated by a motion vector generator . a difference vector corresponding to a difference between the motion vector and a motion vector of an already encoded reference pixel block located near the current pixel block to be encoded in said current frame is obtained . an output resulting from a motion detection of the difference vector so as to obtain the minimum step size from said difference vector , through the use of the number of generated bits and the number of bits of said difference vector , is encoded .