1. A motion vector detection apparatus comprising: a calculation unit configured to calculate a temporal distance between a frame to be coded and each of a plurality of reference candidate frames referred to by the frame to be coded; a motion vector detection unit configured to search for a candidate motion vector between the frame to be coded and each of the plurality of reference candidate frames by performing searching with a low level of accuracy for the reference candidate frame in which the temporal distance calculated by the calculation unit is longer than a set temporal distance, and performing searching with a high level of accuracy for the reference candidate frame in which the temporal distance is shorter than the set temporal distance, and detect a motion vector for the frame to be coded from the candidate motion vectors; and a motion vector calculation unit configured to perform motion vector search for the reference candidate frame in which the temporal distance is shorter than the set temporal distance in the same search range as the reference candidate frame in which temporal distance is shorter than the set temporal distance, wherein when the candidate motion vector is searched for between the frame to be coded and the reference candidate frame, an accuracy of searching performed by the motion vector detection unit is changed according to the temporal distance between the frame to be coded and the reference candidate frame calculated by the calculation unit, and a coding type of the reference candidate frame, wherein the shorter the temporal distance between the frame to be coded and the reference candidate frame calculated by the calculation unit becomes, the higher the motion vector search accuracy, and wherein the longer the temporal distance between the frame to be coded and the reference candidate frame calculated by the calculation unit becomes, the lower the motion vector search accuracy.