Patent ID: 7336710

Claim:
A method of detecting motion in a mobile device, the method comprising the steps of: (a) obtaining horizontal and vertical number of macro blocks of a frame and initializing horizontal and vertical sizes of the macro block; (b) moving a predetermined amount of data in a column of the frame to a predetermined number of block buffers of an internal memory; (c) performing motion detection on the data stored in the block buffers and incrementing the vertical number of the macro blocks; (d) ascertaining whether the motion detection is completed on the block buffers in a vertical direction, and if the motion detection is completed on the blocks in the vertical direction, initializing the vertical size of the macro block and incrementing the location of the block buffers in a horizontal direction, moving a predetermined amount of macro block data to a block location making the block buffers form a circular buffer if the motion detection is not completed in the vertical direction, and performing a modulo division operation to form the circular buffer; determining buffer addresses with remaining values; determining similarity according to each block location on the circular buffer to obtain a sum of absolute difference (SAD) value; and (e) ascertaining whether the motion detection is completed on the block buffers in a horizontal direction, and if the motion detection is not completed on the blocks in the horizontal direction, and if the motion detection is not competed on the blocks in the horizontal direction, the method continues to step (b); wherein a search range is (−16, 15), inclusive, and the data is arranged in a 48×16 array in a vertical direction and the data is arranged in a 16×48 array in the horizontal direction so as to pack the data in blocks when moving the data.