Patent ID: 8213513

Claim:
A data reading method for motion estimation in an embedded system, wherein the embedded system comprises a video encoding device and an external memory device, the video encoding device comprises an internal memory, and the external memory device stores a first frame, the data reading method comprising: dividing a second frame into M×N sub frame sets by the embedded system, wherein each of the sub frame sets comprises O×P sub frames, and M, N, O, and P are integers greater than or equal to 1; selecting each of the sub frame sets from the second frame in a calculation sequence by the embedded system, wherein the selected sub frame set is stored into the internal memory; calculating a predicted search path of each of the sub frames in the selected sub frame set by the video encoding device; determining a predicted reading range by the video encoding device, wherein the predicted reading range comprises the predicted search paths of the sub frames; and reading a comparison data from the first frame in the external memory device according to the predicted reading range by the video encoding device, wherein the step of calculating the predicted search path comprises; calculating a predicted motion vector of each of the sub frames in the selected sub frame set; and calculating the predicted search path of each of the sub frames according to the predicted motion vector of the sub frame and a search pattern, wherein in the step of calculating the predicted motion vector of each of the sub frames in the selected sub frame set, if the selected sub frame is in an i th column and a j th row of the second frame, a statistical calculation is performed according to a real motion vector of a calculated sub frame in the i th column or the j th row to calculate the predicted motion vector of the selected sub frame, wherein i and j are both integers greater than or equal to 1, i is smaller than or equal to M×O, and j is smaller than or equal to N×P; wherein when O and P are both 2, M ⁢ ⁢ V P ⁡ ( i , j ) = [ ( M ⁢ ⁢ V R ⁡ ( i , j - 1 ) + M ⁢ ⁢ V R ⁡ ( i - 1 , j ) ) / 2 ] ± M ⁢ ⁢ V E ⁢ ⁢ 1 M ⁢ ⁢ V P ⁡ ( i + 1 , j ) = [ ( 2 ⁢ M ⁢ ⁢ V R ⁡ ( i + 1 , j - 1 ) + M ⁢ ⁢ V R ⁡ ( i - 1 , j ) ) / 3 ] ± M ⁢ ⁢ V E ⁢ ⁢ 2 M ⁢ ⁢ V P ⁡ ( i , j + 1 ) = [ ( M ⁢ ⁢ V R ⁡ ( i , j - 1 ) + 2 ⁢ M ⁢ ⁢ V R ⁡ ( i - 1 , j + 1 ) ) / 3 ] ± M ⁢ ⁢ V E ⁢ ⁢ 3 MV P ⁡ ( i + 1 , j + 1 ) = [ ⁢ ( ⁢ M ⁢ ⁢ V R ⁡ ( i , j - 1 ) + M ⁢ ⁢ V R ⁡ ( i - 1 , j ) + 2 ⁢ M ⁢ ⁢ V R ⁡ ( i + 1 , j - 1 ) + 2 ⁢ M ⁢ ⁢ V R ⁡ ( i - 1 , j + 1 ) ) / ⁢ 6 ] ± M ⁢ ⁢ V E ⁢ ⁢ 4 wherein MV P(i,j) is the predicted motion vector of the sub frame in the i th column and the j th row, MV R(i,j) is the real motion vector of the sub frame in the th column and the j th row, MV E1 is a first error vector, MV E2 is a second error vector, MV E3 is a third error vector, and MV E4 is a fourth error vector.