An apparatus for determining a motion vector to be used in inter-prediction of a current block of a video frame, the apparatus comprising: • a search space determining unit configured to: ∘ obtain an estimate of the motion vector, ∘ determine a first search space comprising a plurality of candidate motion vectors based on the estimate (S 1802), ∘ calculate for each candidate motion vector among the plurality of candidate motion vectors a cost value based on a cost function, select a first (MVo') and a second (MVo'secondBest) candidate motion vector in the first search space according to the cost function (S 1803), wherein the first (MVo') candidate motion vector has a smallest cost value among the calculated cost values and the second (MVo'secondBest) candidate motion vector has a second smallest cost value among the calculated cost values, and ∘ determine a second search space comprising one or more candidate motion vectors based on the first and the second candidate motion vectors (S 1804), wherein the determining of the second search space by the search space determining unit based on the first and second candidate motion vectors comprises: ▪ determining a size or a position of the second search space in accordance with a direction of a line connecting those positions to which the first and the second candidate motion vectors point; and • a motion vector selecting unit configured to select, among the one or more candidate motion vectors contained in the second search space and the plurality of candidate motion vectors contained in the first search space, one candidate motion vector having a smallest cost value as the motion vector to be used in inter-prediction (S 1806), wherein each candidate motion vector contained in the second search space also has a corresponding cost value calculated based on the cost function (S 1805). • a search space determining unit configured to: ∘ obtain an estimate of the motion vector, ∘ determine a first search space comprising a plurality of candidate motion vectors based on the estimate (S 1802), ∘ calculate for each candidate motion vector among the plurality of candidate motion vectors a cost value based on a cost function, select a first (MVo') and a second (MVo'secondBest) candidate motion vector in the first search space according to the cost function (S 1803), wherein the first (MVo') candidate motion vector has a smallest cost value among the calculated cost values and the second (MVo'secondBest) candidate motion vector has a second smallest cost value among the calculated cost values, and ∘ determine a second search space comprising one or more candidate motion vectors based on the first and the second candidate motion vectors (S 1804), wherein the determining of the second search space by the search space determining unit based on the first and second candidate motion vectors comprises: ▪ determining a size or a position of the second search space in accordance with a direction of a line connecting those positions to which the first and the second candidate motion vectors point; and ∘ obtain an estimate of the motion vector, ∘ determine a first search space comprising a plurality of candidate motion vectors based on the estimate (S 1802), ∘ calculate for each candidate motion vector among the plurality of candidate motion vectors a cost value based on a cost function, select a first (MVo') and a second (MVo'secondBest) candidate motion vector in the first search space according to the cost function (S 1803), wherein the first (MVo') candidate motion vector has a smallest cost value among the calculated cost values and the second (MVo'secondBest) candidate motion vector has a second smallest cost value among the calculated cost values, and ∘ determine a second search space comprising one or more candidate motion vectors based on the first and the second candidate motion vectors (S 1804), wherein the determining of the second search space by the search space determining unit based on the first and second candidate motion vectors comprises: ▪ determining a size or a position of the second search space in accordance with a direction of a line connecting those positions to which the first and the second candidate motion vectors point; and ▪ determining a size or a position of the second search space in accordance with a direction of a line connecting those positions to which the first and the second candidate motion vectors point; and • a motion vector selecting unit configured to select, among the one or more candidate motion vectors contained in the second search space and the plurality of candidate motion vectors contained in the first search space, one candidate motion vector having a smallest cost value as the motion vector to be used in inter-prediction (S 1806), wherein each candidate motion vector contained in the second search space also has a corresponding cost value calculated based on the cost function (S 1805).