--- branches/dev-api-4/xvidcore/src/motion/motion_est.h 2003/08/03 10:10:54 1108 +++ branches/dev-api-4/xvidcore/src/motion/motion_est.h 2003/08/28 11:06:16 1132 @@ -21,7 +21,7 @@ * along with this program ; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * - * $Id: motion_est.h,v 1.3.2.15 2003-08-03 10:10:54 syskin Exp $ + * $Id: motion_est.h,v 1.3.2.18 2003-08-28 11:06:16 syskin Exp $ * ****************************************************************************/ @@ -121,6 +121,7 @@ uint32_t iEdgedWidth; uint32_t iFcode; int * temp; + int * dir; int qpel, qpel_precision; int chroma; int rrv; @@ -145,9 +146,8 @@ typedef void(CheckFunc)(const int x, const int y, - const int Direction, int * const dir, - const SearchData * const Data); -CheckFunc *CheckCandidate; + const SearchData * const Data, + const int Direction); /* * Calculate the min/max range @@ -160,36 +160,38 @@ int32_t * const max_dy, const uint32_t x, const uint32_t y, - uint32_t block_sz, /* block dimension, 8 or 16 */ + uint32_t block_sz, /* block dimension, 3(8) or 4(16) */ const uint32_t width, const uint32_t height, const uint32_t fcode, - const int qpel, /* 1 if the resulting range should be in qpel precision; otherwise 0 */ + const int precision, /* 2 for qpel, 1 for halfpel */ const int rrv) { - int k, m = qpel ? 4 : 2; - const int search_range = 32 << (fcode - 1); + int k; + const int search_range = 16 << fcode; int high = search_range - 1; int low = -search_range; if (rrv) { high = RRV_MV_SCALEUP(high); low = RRV_MV_SCALEUP(low); - block_sz *= 2; + block_sz++; } - k = m * (int)(width - x * block_sz); + k = (int)(width - (x<