To provide a motion vector detector capable of improving the coding efficiency and the image quality by providing each means for counting number of times of arithmetic operation, control and decision of retrieval range.
This motion vector detector consisting of a matching detection means 7, a tentative motion vector generating means 6, a motion vector selection means 8 or the like is provided with an arithmetic operation number count means 3, an arithmetic operation number control means 4, and a retrieval range decision means 2. The arithmetic number count means 3 counts number of times of difference arithmetic operation for inter-block of two patterns conducted by the matching detection means 7, and the arithmetic number control means 4 controls a difference arithmetic operation number by the matching detection means 7 to obtain a motion vector. The retrieval range decision means 2 is made up of a retrieval position decision means 2-1 deciding a center position to retrieve a motion vector based on the information of peripheral motion vectors and a retrieval area decision means 2-2 deciding the range of the retrieval area.