--- trunk/xvidcore/src/motion/motion_est.c 2002/07/28 17:10:39 348 +++ trunk/xvidcore/src/motion/motion_est.c 2002/08/12 10:07:16 370 @@ -186,6 +186,9 @@ MACROBLOCK *const pMB = &pMBs[x + y * iWcount]; + if (pMB->mode == MODE_NOT_CODED) + continue; + predMV = get_pmv2(pMBs, pParam->mb_width, 0, x, y, 0); pMB->sad16 = @@ -2888,6 +2891,9 @@ *currMV = pmv[0] = pmv[1] = pmv[2] = pmv[3] = zeroMV; } else { + + bPredEq = get_ipmvdata(pMBs, iWcount, 0, x, y, 0, pmv, psad); + threshA = psad[0]; threshB = threshA + 256; if (threshA < 512) @@ -2897,7 +2903,6 @@ if (threshB > 1792) threshB = 1792; - bPredEq = get_ipmvdata(pMBs, iWcount, 0, x, y, 0, pmv, psad); *currMV = pmv[0]; /* current best := prediction */ } @@ -3209,11 +3214,11 @@ : mb->mvs[k].y - mb->directmv[k].y); d_sad16 += - sad8bi(frame->image.y + 2*(i+(k&1))*8 + 2*(j+(k>>1))*8*edged_width, + sad8bi(frame->image.y + (2*i+(k&1))*8 + (2*j+(k>>1))*8*edged_width, get_ref_mv(f_ref->y, f_refH->y, f_refV->y, f_refHV->y, - 2*(i+(k&1)), 2*(j+(k>>1)), 8, &mb->mvs[k], edged_width), + (2*i+(k&1)), (2*j+(k>>1)), 8, &mb->mvs[k], edged_width), get_ref_mv(b_ref->y, b_refH->y, b_refV->y, b_refHV->y, - 2*(i+(k&1)), 2*(j+(k>>1)), 8, &mb->b_mvs[k], edged_width), + (2*i+(k&1)), (2*j+(k>>1)), 8, &mb->b_mvs[k], edged_width), edged_width); } }