--- motion_inlines.h 2003/09/10 22:19:00 1.1.2.1 +++ motion_inlines.h 2004/12/08 12:43:48 1.4 @@ -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_inlines.h,v 1.1.2.1 2003/09/10 22:19:00 edgomez Exp $ + * $Id: motion_inlines.h,v 1.4 2004/12/08 12:43:48 syskin Exp $ * ****************************************************************************/ @@ -44,21 +44,14 @@ 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 precision, /* 2 for qpel, 1 for halfpel */ - const int rrv) + const int fcode, + const int precision) /* 2 for qpel, 1 for halfpel */ { int k; - const int search_range = 16 << fcode; + const int search_range = 1 << (4+fcode); int high = search_range - 1; int low = -search_range; - if (rrv) { - high = RRV_MV_SCALEUP(high); - low = RRV_MV_SCALEUP(low); - block_sz++; - } - k = (int)(width - (x<>= (iFcode - 1); - bits += mvtab[x]; + bits += r_mvtab[x+63]; y -= pred.y; bits += (y != 0 ? iFcode:0); - y = abs(y); - y += q; + y = -abs(y); y >>= (iFcode - 1); - bits += mvtab[y]; + bits += r_mvtab[y+63]; return bits; } @@ -133,11 +123,13 @@ pMB->mvs[0] = pMB->mvs[1] = pMB->mvs[2] = pMB->mvs[3] = zeroMV; pMB->qmvs[0] = pMB->qmvs[1] = pMB->qmvs[2] = pMB->qmvs[3] = zeroMV; pMB->sad16 = pMB->sad8[0] = pMB->sad8[1] = pMB->sad8[2] = pMB->sad8[3] = sad; + pMB->mcsel = 0; + pMB->cbp = 0; } /* check if given vector is equal to any vector checked before */ static __inline int -vector_repeats(const VECTOR * const pmv, const int i) +vector_repeats(const VECTOR * const pmv, const unsigned int i) { unsigned int j; for (j = 0; j < i; j++) @@ -148,7 +140,7 @@ /* make a binary mask that prevents diamonds/squares from checking a vector which has been checked as a prediction */ static __inline int -make_mask(const VECTOR * const pmv, const int i, const int current) +make_mask(const VECTOR * const pmv, const unsigned int i, const unsigned int current) { unsigned int mask = 255, j; for (j = 0; j < i; j++) {