--- motion_est.h 2003/08/03 10:10:54 1.3.2.15 +++ motion_est.h 2003/09/04 18:40:02 1.3.2.19 @@ -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.19 2003/09/04 18:40:02 Isibaar Exp $ * ****************************************************************************/ @@ -110,7 +110,10 @@ VECTOR predMV; VECTOR * currentMV; VECTOR * currentQMV; + VECTOR * currentMV2; + VECTOR * currentQMV2; int32_t * iMinSAD; + int32_t * iMinSAD2; const uint8_t * RefP[6]; /* N, V, H, HV, cU, cV */ const uint8_t * CurU; const uint8_t * CurV; @@ -121,6 +124,7 @@ uint32_t iEdgedWidth; uint32_t iFcode; int * temp; + int * dir; int qpel, qpel_precision; int chroma; int rrv; @@ -145,9 +149,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 +163,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<