US2013223532A1PendingUtilityA1

Motion estimation and in-loop filtering method and device thereof

51
Assignee: VIA TELECOM INCPriority: Feb 27, 2012Filed: Feb 26, 2013Published: Aug 29, 2013
Est. expiryFeb 27, 2032(~5.6 yrs left)· nominal 20-yr term from priority
H04N 19/122H04N 19/82H04N 19/523H04N 19/50H04N 19/533H04N 19/117H04N 19/433H04N 19/547H04N 19/56H04N 19/00569
51
PatentIndex Score
0
Cited by
0
References
0
Claims

Abstract

A motion estimation method is provided. The method has the following steps of: determining a start searching point according to multiple neighboring macroblocks of a current macroblock, wherein the current macroblock corresponds to a searching window; determining a best candidate pixel according to a first line segment where the start searching point is located, and a second/third line segment above/beneath the first line segment; determining whether the best candidate pixel is located at the first line segment; if so, setting a candidate motion vector corresponding to the best candidate pixel as a first motion vector of the current macroblock; and if not, dynamically adjusting the second line segment or the third line segment in the searching window to update the best candidate pixel, and retrieving the first motion vector of the current macroblock corresponding to the updated best candidate pixel.

Claims

exact text as granted — not AI-modified
What is claimed is: 
     
         1 . A motion estimation acceleration circuit applied in a video encoding system supporting multiple video codec standards, comprising:
 a start searching point prediction unit, configured to determine a start searching point according to multiple neighboring macroblocks of a current macroblock, wherein the current macroblock corresponds to a searching window; and   an integer pixel estimation unit, configured to determine a best candidate pixel according to a first line segment at where the start searching point is located, a second line segment on the first line segment, and a third line segment beneath the first line segment,   wherein the integer pixel estimation unit further determines whether the best candidate pixel is located at the first line segment,   if so, the integer pixel estimation unit sets a candidate motion vector corresponding to the best candidate pixel as a first current macroblock motion vector;   if not, the integer pixel estimation unit dynamically adjusts the second line segment or the third line segment in the searching window to update the best candidate pixel, and retrieves the first current macroblock motion vector corresponding to the updated best candidate pixel.   
     
     
         2 . The motion estimation acceleration circuit as claimed in  claim 1 , wherein the start searching point prediction unit further calculates multiple macroblock reference pixels pointed by multiple second neighboring macroblock motion vectors, and calculates multiple neighboring macroblock sum of absolute difference values corresponding to the macroblock reference points, wherein the start searching point prediction unit further assigns one of the macroblock reference points corresponding to the least one of the neighboring macroblock sum of absolute difference values as the start searching points. 
     
     
         3 . The motion estimation acceleration circuit as claimed in  claim 2 , wherein when the current macroblock is located at a boundary of a current frame, the start searching point prediction unit further substitutes the second neighboring macroblock motion vectors with a zero motion vector, and sets the start searching point as the zero point. 
     
     
         4 . The motion estimation acceleration circuit as claimed in  claim 2 , wherein the integer pixel estimation unit calculates the first current macroblock motion vector by executing the following steps of:
 (a) dividing the current macroblock into at least one 8×8 block, taking a pixel word having four pixels, including the start searching point as center for each 8×8 block, and retrieving 36 initial candidate points from the first line segment, the second line segment and the third line segment, wherein the first line segment comprises the pixel word and four neighboring pixels left and right to the pixel word;   (b) calculating a first sub-macroblock sum of absolute difference value of each initial candidate point relative to each 8×8 block to obtain an initial current macroblock sum of absolute difference value corresponding to each initial candidate point, and obtaining a first least current macroblock sum of absolute difference value according to the initial current macroblock sum of absolute difference values;   (c) determining whether a best candidate point corresponding to the first least current macroblock sum of absolute difference value is located at the second line segment,
 if so, executing step (d); 
 if not, determining whether the best candidate point corresponding to the first least current macroblock sum of absolute difference value is located at the third line segment,
 if so, executing step (f); and 
 if not, executing step (j); 
 
   (d) determining whether the second line segment is located at a boundary of the searching window corresponding to the current macroblock,
 if so, executing step (j); and 
 if not, moving down the second line segment by 1 pixel, adjusting the moved second line segment in a horizontal direction to generate 12 first refined candidate points according to a pixel word at which the best candidate point is located, and executing step (e); 
   (e) calculating a second sub-macroblock sum of absolute difference value of each 8×8 block relative to the first refined candidate points to obtain a second current macroblock sum of absolute difference value corresponding to each first refined candidate point, and obtaining a second least current macroblock sum of absolute difference value according to the second current macroblock sum of absolute difference value corresponding to each first refined candidate point;   (f) determining whether the second least current macroblock sum of absolute difference value is larger than the first least current macroblock sum of absolute difference value,
 if so, executing step (j); and 
 if not, setting the second least current macroblock sum of absolute difference value as the first least current macroblock sum of absolute difference value, and executing step (d); 
   (g) determining whether the third line segment is located at the boundary of the searching window corresponding to the current macroblock,
 if so, executing step (j); and 
 if not, moving up the third line segment by 1 pixel, adjusting the moved third line segment in the horizontal direction to generate 12 second refined candidate points according to the pixel word at which the best candidate point is located, and executing step (f); 
   (h) calculating a third sub-macroblock sum of absolute difference value of each 8×8 block relative to the second refined candidate points to obtain a third current macroblock sum of absolute difference value corresponding to each second refined candidate point, and obtaining a third least current macroblock sum of absolute difference value according to the third current macroblock sum of absolute difference value corresponding to each second refined candidate point;   (i) determining whether the third least current macroblock sum of absolute difference value is larger than the first least current macroblock sum of absolute difference value,
 if so, executing step (j); and 
 if not, setting the third least current macroblock sum of absolute difference value as the first least current macroblock sum of absolute difference value, and executing step (g); and 
   (j) setting a first motion vector corresponding to the first least current macroblock sum of absolute difference value as the current macroblock integer pixel motion vector, and setting multiple motion vectors pointing to the second sub-macroblock sum of absolute difference value or the third sub-macroblock sum of absolute difference value as multiple sub-macroblock motion vectors corresponding to the 8×8 blocks in the current macroblock.   
     
     
         5 . The motion estimation acceleration circuit as claimed in  claim 4 , further comprising:
 a half pixel estimation unit, configured to search for eight half pixels around the best candidate point as the center, wherein when multiple half pixel sub-macroblock sum of absolute difference values or a half pixel current macroblock sum of absolute difference value corresponding to the half pixels are smaller than the sub-macroblock motion vectors or then current macroblock motion vector, the half pixel estimation unit further sets the half pixel sub-macroblock sum of absolute difference values or the half pixel current macroblock sum of absolute difference value as the sub-macroblock motion vectors or the current macroblock motion vector, respectively.   
     
     
         6 . The motion estimation acceleration circuit as claimed in  claim 1 , further comprising:
 a prediction difference calculating unit configured to determine an encoding mode of the current macroblock according to a rate distortion optimization value.   
     
     
         7 . The motion estimation acceleration circuit as claimed in  claim 1 , wherein the motion estimation acceleration circuit further reads pixels of the searching window from a searching window buffer having four memory banks, wherein the motion estimation acceleration circuit further reads three of the four memory banks sequentially, and pixels of the searching window, which are used for filtering a next macroblock, are read by a DMA controller from an external storage unit to the one of the four memory banks which is not being read by the motion estimation acceleration circuit. 
     
     
         8 . The motion estimation acceleration circuit as claimed in  claim 4 , wherein the integer pixel estimation unit comprises 12 processing elements in parallel, and multiple flip-flops, wherein the processing elements are divided into four groups, wherein the integer pixel estimation unit further broadcasts pixels of the searching window to the processing elements, and the pixels of the current macroblock are reordered into four sets of data, which are transmitted to the processing elements through four transmission paths. 
     
     
         9 . The motion estimation acceleration circuit as claimed in  claim 5 , wherein the half pixel estimation unit further comprises 4 sets of 10-bit adders, 3 sets of rounding and shifting units, and 8 processing elements in parallel, wherein the 10-bit adders and the round and shifting units are configured to calculate interpolation of the half pixels, and the processing elements are configured to search for the half pixels. 
     
     
         10 . The motion estimation acceleration circuit as claimed in  claim 1 , wherein the video codec standards supported by the motion estimation acceleration circuit comprise MPEG2, MPEG4 and H.263. 
     
     
         11 . A motion estimation method applied in a motion estimation acceleration circuit in a video encoding system supporting multiple video codec standards, comprising:
 determining a start searching point according to multiple neighboring macroblocks of a current macroblock, wherein the current macroblock corresponds to a searching window;   determining a best candidate pixel according to a first line segment where the start searching point is located, a second line segment on the first line segment, and a third line segment beneath the first line segment;   determining whether the best candidate pixel is located at the first line segment;   if so, setting a candidate motion vector corresponding to the best candidate pixel as a first motion vector of the current macroblock; and   if not, dynamically adjusting the second line segment or the third line segment in the searching window to update the best candidate pixel, and retrieving the first motion vector of the current macroblock corresponding to the updated best candidate pixel.   
     
     
         12 . The motion estimation method as claimed in  claim 11 , wherein the step of determining the start searching point further comprises:
 calculating multiple macroblock reference pixels pointed by multiple second neighboring macroblock motion vectors;   calculating multiple neighboring macroblock sum of absolute difference values corresponding to the macroblock reference points; and   assigning one of the macroblock reference points corresponding to the lea of the neighboring macroblock sum of absolute difference values as the start searching points.   
     
     
         13 . The motion estimation method as claimed in  claim 12 , further comprising:
 substituting the second neighboring macroblock motion vectors with a zero motion vector when the current macroblock is located at a boundary of a current frame; and   setting the start searching point as the zero point.   
     
     
         14 . The motion estimation method as claimed in  claim 13 , wherein the step of calculating the current macroblock motion vector further comprises the following steps of:
 (a) dividing the current macroblock into at least one 8×8 block, taking a pixel word having four pixels including the start searching point as center for each 8×8 block, and retrieving 36 initial candidate points from the first line segment, the second line segment and the third line segment, wherein the first line segment comprises the pixel word and four neighboring pixels left and right to the pixel word;   (b) calculating a first sub-macroblock sum of absolute difference value of each initial candidate point relative to each 8×8 block to obtain a initial current macroblock sum of absolute difference value corresponding to each initial candidate point, and obtaining a first least current macroblock sum of absolute difference value according to the initial current macroblock sum of absolute difference values;   (c) determining whether a best candidate point corresponding to the first least current macroblock sum of absolute difference value is located at the second line segment,
 if so, executing step (d); 
 if not, determining whether the best candidate point corresponding to the first least current macroblock sum of absolute difference value is located at the third line segment,
 if so, executing step (f); and 
 if not, executing step (j); 
 
   (d) determining whether the second line segment is located at a boundary of the searching window corresponding to the current macroblock,
 if so, executing step (j); and 
 if not, moving down the second line segment by 1 pixel, adjusting the moved second line segment in a horizontal direction to generate 12 first refined candidate points according to a pixel word at which the best candidate point is located, and executing step (e); 
   (e) calculating a second sub-macroblock sum of absolute difference value of each 8×8 block relative to the first refined candidate points to obtain a second current macroblock sum of absolute difference value corresponding to each first refined candidate point, and obtaining a second least current macroblock sum of absolute difference value according to the second current macroblock sum of absolute difference value corresponding to each first refined candidate point;   (f) determining whether the second least current macroblock sum of absolute difference value is larger than the first least current macroblock sum of absolute difference value,
 if so, executing step (j); and 
 if not, setting the second least current macroblock sum of absolute difference value as the first least current macroblock sum of absolute difference value, and executing step (d); 
   (g) determining whether the third line segment is located at the boundary of the searching window corresponding to the current macroblock,
 if so, executing step (j); and 
 if not, moving up the third line segment by 1 pixel, adjusting the moved third line segment in the horizontal direction to generate 12 second refined candidate points according to the pixel word at which the best candidate point is located, and executing step (f); 
   (h) calculating a third sub-macroblock sum of absolute difference value of each 8×8 block relative to the second refined candidate points to obtain a third current macroblock sum of absolute difference value corresponding to each second refined candidate point, and obtaining a third least current macroblock sum of absolute difference value according to the third current macroblock sum of absolute difference value corresponding to each second refined candidate point;   (i) determining whether the third least current macroblock sum of absolute difference value is larger than the first least current macroblock sum of absolute difference value,
 if so, executing step (j); and 
 if not, setting the third least current macroblock sum of absolute difference value as the first least current macroblock sum of absolute difference value, and executing step (g); and 
   (j) setting a first motion vector corresponding to the first least current macroblock sum of absolute difference value as the current macroblock integer pixel motion vector, and setting multiple motion vectors pointing to the second sub-macroblock sum of absolute difference value or the third sub-macroblock sum of absolute difference value as multiple sub-macroblock motion vectors corresponding to the 8×8 blocks in the current macroblock.   
     
     
         15 . The motion estimation method as claimed in  claim 14 , further comprising:
 searching for eight half pixels around the best candidate point as the center; and   when multiple half pixel sub-macroblock sum of absolute difference values or a half pixel current macroblock sum of absolute difference value corresponding to the half pixels are smaller than the sub-macroblock motion vectors or then current macroblock motion vector, setting the half pixel sub-macroblock sum of absolute difference values or the half pixel current macroblock sum of absolute difference value as the sub-macroblock motion vectors or the current macroblock motion vector, respectively.   
     
     
         16 . The motion estimation method as claimed in  claim 11 , further comprising:
 determining an encoding mode of the current macroblock according to a rate distortion optimization value.   
     
     
         17 . The motion estimation method as claimed in  claim 11 , wherein pixels of the searching window are read from a searching window buffer having four memory banks, and the method further comprises:
 reading three of the four memory banks sequentially; and   reading pixels of the searching window, which are used for filtering a next macroblock, to one of the four memory banks which is not read via a DMA controller.   
     
     
         18 . The motion estimation method as claimed in  claim 11 , wherein the video codec standards supported by the motion estimation method comprise MPEG2, MPEG4 and H.263. 
     
     
         19 . An in-loop filtering acceleration circuit applied in a video codec system supporting the H.264 standard and the VC-1 standard, the video codec system comprising a processing unit to perform video processing to generate at least one reconstructed macroblock and a value of boundary strength corresponding to each edge of the reconstructed macroblock, the circuit comprising:
 multiple one-dimensional (1D) filters configured to perform a filtering process; and   a filter selection unit configured to select one of the 1D filters according to the value of the boundary strength to perform the filtering processing to the reconstructed macroblock,   wherein the in-loop filtering acceleration circuit further divides the reconstructed macroblock into multiple 8×8 blocks and multiple 4×4 blocks, performs the filtering process to horizontal edges of the 8×8 blocks the reconstructed macroblock row by row from bottom to top, and performs the filtering process to horizontal edges of the 4×4 blocks row by row from top to bottom,   wherein the in-loop filtering acceleration circuit further performs the filtering process to vertical edges of the 8×8 blocks column by column from right to left, and performs the filtering process to vertical edges of the 4×4 blocks column by column from left to right.   
     
     
         20 . The in-loop filtering acceleration circuit as claimed in  claim 19 , wherein the 1D filters comprises multiple H.264 strong filers, multiple H.264 general filters, and a VC-1 filter, and the 1D filters further performs the filtering process to horizontal edges or vertical edges of one of the 8×8 blocks. 
     
     
         21 . The in-loop filtering acceleration circuit as claimed in  claim 20 , wherein when the value of boundary strength corresponding to an edge is 0, the in-loop filtering acceleration circuit does not perform the filtering process;
 wherein when the value of boundary strength corresponding to the edge is between 1 to 3, the filter selection unit selects the H.264 general filters to perform the filtering process on the edge;   wherein when the value of boundary strength corresponding to the edge is 4, the filter selection unit selects the H.264 strong filters to perform the filtering process on the edge; and   wherein when the value of boundary strength corresponding to the edge is 5, the filter selection unit selects the VC-1 filter to perform the filtering process on the edge.   
     
     
         22 . The in-loop filtering acceleration circuit as claimed in  claim 19 , further comprising:
 multiple transposition register arrays, configured to store a portion of the reconstructed macroblock, and transpose pixels of the reconstructed macroblock, so that the transposed pixels of the reconstructed macroblock are read by the 1D filters row by row or column by column.   
     
     
         23 . The in-loop filtering acceleration circuit as claimed in  claim 20 , wherein the filter selection unit further calculates multiple filter selection parameters according to the pixels of the reconstructed macroblock, and selects one of the H.264 strong filters, the H.264 general filters and the VC-1 filter according to the value of boundary strength, a luminance parameter, a clipping parameter, a bit rate parameter and the filter selection parameters to perform the filtering process. 
     
     
         24 . An in-loop filtering method applied in an in-loop filtering acceleration circuit of a video codec system supporting the H.264 standard and the VC-1 standard, the video codec system comprising a processing unit to perform video processing to generate at least one reconstructed macroblock and a value of boundary strength corresponding to each edge of the reconstructed macroblock, the method comprising:
 dividing the reconstructed macroblock into multiple 8×8 blocks and multiple 4×4 blocks;   selecting one of multiple 1D filters according to the value of the boundary strength to perform the filtering processing to the reconstructed macroblock;   performing the filtering process to horizontal edges of the 8×8 blocks, the reconstructed macroblock row by row from down to up, and performing the filtering process to horizontal edges of the 4×4 blocks row by row from top to bottom; and   performing the filtering process to vertical edges of the 8×8 blocks column by column from right to left, and performing the filtering process to vertical edges of the 4×4 blocks column by column from left to right.   
     
     
         25 . The in-loop filtering method as claimed in  claim 24 , wherein the 1D filters comprises multiple H.264 strong filers, multiple H.264 general filters, and a VC-1 filter. 
     
     
         26 . The in-loop filtering method as claimed in  claim 24 , wherein the step of selecting one of the 1D filters according to the value of boundary strength further comprises:
 selecting the H.264 general filters to perform the filtering process on the edge when the value of boundary strength corresponding to the edge is between 1 to 3;   selecting the H.264 strong filters to perform the filtering process on the edge when the value of boundary strength corresponding to the edge is 4; and   selecting the VC-1 filter to perform the filtering process on the edge when the value of boundary strength corresponding to the edge is 5.   
     
     
         27 . The in-loop filtering method as claimed in  claim 24 , further comprising:
 calculating multiple filter selection parameters according to the pixels of the reconstructed macroblock; and   selecting one of the H.264 strong filters, the H.264 general filters and the VC-1 filter according to the value of boundary strength, a luminance parameter, a clipping parameter, a bit rate parameter and the filter selection parameters to perform the filtering process.

Cited by (0)

No later patents cite this yet.

References (0)

No backward citations on record.