In a case where the current number of motion vector predictor candidates numCurrMvpCand is larger than or equal to the maximum number of elements of the motion vector predictor candidate list mvpListLX (here, 2), or the number of history-based motion vector predictor candidates NumHmvpCand is 0 (step S2201: NO in FIG. 29), the process of steps S2202 to S2209 of FIG. 29 will be omitted, and the history-based motion vector predictor candidate derivation processing procedure will be finished. In a case where the number numCurrMvpCand of the current motion vector predictor candidates is smaller than 2, which is the maximum number of elements of the motion vector predictor candidate list mvpListLX, and in a case where the value of the number NumHmvpCand of the history-based motion vector predictor candidates is greater than 0 (step S2201: YES in FIG. 29), the process of steps S2202 to S2209 in FIG. 29 will be performed.