1. A method for motion estimation, executed by an apparatus for motion estimation, comprising: (a) a layer generator of the apparatus for motion estimation using an original frame data and a reference frame data to form a hierarchical data structure, and the hierarchical data structure comprising N layers, wherein the N th layer contains the original frame data and the reference frame data, the remaining i th layers contain the data generated based on the original frame data and the reference frame data, and an image resolution of the i th layer is lower than an image resolution of the (i+1) th layer, where N is a positive integer greater than or equal to 2, and 1≦i<N; (b) a global search unit of the apparatus for motion estimation selecting at least one candidate set from a plurality of candidate sets of a macroblock on the first layer according to costs of the candidate sets mentioned above and providing the selected candidate set(s) to the 2 nd layer, wherein each of the candidate sets is a set of a variable block mode of the macroblock and a motion vector of each of the blocks in the variable block mode; (c) at least one local search unit of the apparatus for motion estimation sequentially performing the following two substeps on each i th layer in an order of 2≦i <N starting from the 2 nd layer if N is greater than 2: (c1) performing a local search based on the candidate set(s) provided by the (i−1) th layer; and (c2) selecting at least one candidate set from the candidate set(s) obtained from the local search according to cost(s) of the candidate set(s) after the local search, and providing the selected candidate set(s) to the (i+1) th layer; and (d) a final search unit of the apparatus for motion estimation performing the following two substeps on the N th layer: (d1) performing a local search based on the candidate set(s) provided by the (N−1) th layer; and (d2) selecting one candidate set from the candidate set(s) obtained from the local search according to cost(s) of the candidate set(s) after the local search, wherein the apparatus for motion estimation, the layer generator, the global search unit, the local search unit, and the final search unit are hardware.