The accompanying drawings are included to provide a further understanding of the invention, and are incorporated in and constitute a part of this specification. The drawings illustrate embodiments of the invention and, together with the description, serve to explain the principles of the invention. In the drawings,
Reference will now be made in detail to the present preferred embodiments of the invention, examples of which are illustrated in the accompanying drawings. Wherever possible, the same reference numbers are used in the drawings and the description to refer to the same or like parts.
While the specification concludes with claims defining the features of the invention that are regarded as novel, it is believed that the invention will be better understood from a consideration of the following description in conjunction with the figures, in which like reference numerals are carried forward.
Reference is made to
In the first phase 110, every time is separated a fixed sampling point to carry on a time of search. It takes advantage of this the regular search movement, and greatly saves the access time which because the same data request consumes. After determining several candidates, the motion vectors that approaching the best solution could be obtained efficiently.
Moreover, when the first phase 110 is processing, because of no needs to decide a finally motion vector, therefore it have not to achieve total character accuracy. Which only picks up several higher digits in pixels, then reduces bandwidth request of memory access. In addition, for co-operates a motion vector searching of variable block sizes, the first phase 110 only must calculate a single block. For example, an operation of a 16×16 macroblock mode, above two methods may largely reduce the calculation, and accuracy of the maintaining motion vectors.
The second phase 120, in accordance with several candidates which decided in the first phase 110, carries on a local small range full search. Because the first phase 110 has attained several candidates that approaching the best solution, therefore must make a further search in view of these motion vectors tendencies. Starting from a candidate makes a small range full search, then according to all vectors which search for, discovering the best 4×4 block motion estimation. Finally, selects the best 41 groups of motion vector of several kinds of blocks from the remaining block modes.
Reference is made to
In accordance with the several better candidate motion blocks from the first stage 110, processing a small range full search, and obtaining the better motion vectors, which is a purpose of the second stage 120. In a preferred embodiment of the present invention, find the possible best motion tendency from a part of whole search range. So in a step 250, which includes searching every possible candidate in sequence, and a step 260 includes proceeding with a method of small range full search until every possible candidate is being searched. A last step 270 includes finding 41 groups of motion vectors in accordance with H.264 decoding standard. The 41 groups of motion vectors include a group of 16×16 macroblock mode, two groups of 16×8 macroblock modes, two groups of 8×16 macroblock modes, four groups of 8×8 macroblock modes, eight groups of 8×4 macroblock modes, eight groups of 4×8 macroblock modes and sixteen groups of 4×4 macroblock modes. All 41 groups of motion vectors will transmit to fraction motion estimation for next operation.
Reference is made to Table 1, which shows bit numbers generated by a weight generator of the preferred embodiment of the present invention. The bit numbers generated by the weight generator from calculates the prediction code of weight. An embodiment of the present invention uses reference software Joint Model 9.3 for developing a prediction method. The prediction method predicts the present motion vectors could be encoded the bit numbers in Table 1. A search range in Table 1 is 16, which means the search range of pixel is from −16 to +16. In accordance with the bit numbers, the motion vectors, and the Lagrangian mode decision method from H.264 standard encoding process, which could obtain an initial weight.
Reference is made to
A reason of above operation is that quality of a frame has slightly distortion by omitting the LSB 320. If omitting more than four bits, then human's eyes will observe the distortion of frame. And another advantage is the hardware for processing follow-up operations could only use a 4-bits accumulator 330, and need not an 8-bits accumulator. Besides, the access time of accessing from memory at another chip could be reduced for original a half.
Reference is made to
According the above-mentioned preferred embodiment of the present invention, there are the following advantages if this invention is applied to:
1. The embodiment of the present invention offers a method of searching all possible candidates at fixed interval in a small area. It could obtain the best motion vector and the moving tendency of every candidate. And it could avoid the distortion caused by great motion of content of a frame.
2. Aiming at plenty of reference frames to search, the embodiment of the present invention can do the first-staged gradually candidate search for each frame. The second stage only needs to find out the better candidates the first stage choose and then search for the best motion vector. For example, if search 4 reference frames of every search block, and search 1 point at a fixed interval of 5 points for 4 candidates in the first stage, and search (−2,+2) pixel around the 4 candidates in the second stage, then it only needs (((16*2)/5+1)̂2*4)+4*((2*2+1)̂2)=296 searching times; and a full area search needs ((16*2+1)̂2)*4=4356 searching times. So the embodiment of the present invention could reduce amount of calculation of conventional all area search method to (4356−296)/4356=93%.
3. Because of applying regularly search method of the embodiment of the invention, the same data could be used massively. The method could reduce enormously action of memory accessing and lower requirement of memory bandwidth from system.
It will be apparent to those skilled in the art that various modifications and variations can be made to the structure of the present invention without departing from the scope or spirit of the invention. In view of the foregoing, it is intended that the present invention cover modifications and variations of this invention provided they fall within the scope of the following claims and their equivalents.