--- trunk/xvidcore/src/motion/estimation_bvop.c 2004/12/17 10:45:01 1575 +++ trunk/xvidcore/src/motion/estimation_bvop.c 2005/03/14 00:47:08 1604 @@ -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: estimation_bvop.c,v 1.21 2004-12-17 10:45:01 syskin Exp $ + * $Id: estimation_bvop.c,v 1.23 2005-03-14 00:47:07 Isibaar Exp $ * ****************************************************************************/ @@ -141,7 +141,7 @@ + d_mv_bits(xb, yb, data->bpredMV, data->iFcode, data->qpel^data->qpel_precision); sad = sad16bi(data->Cur, ReferenceF, ReferenceB, data->iEdgedWidth); - sad += (data->lambda16 * t * sad)>>10; + sad += (data->lambda16 * t); if (data->chroma && sad < *data->iMinSAD) sad += ChromaSAD2((xcf >> 1) + roundtab_79[xcf & 0x3], @@ -207,7 +207,7 @@ if (sad > *(data->iMinSAD)) return; } - sad += (data->lambda16 * d_mv_bits(x, y, zeroMV, 1, 0) * sad)>>10; + sad += (data->lambda16 * d_mv_bits(x, y, zeroMV, 1, 0)); if (data->chroma && sad < *data->iMinSAD) sad += ChromaSAD2((xcf >> 3) + roundtab_76[xcf & 0xf], @@ -265,7 +265,7 @@ done: sad = sad16bi(data->Cur, ReferenceF, ReferenceB, data->iEdgedWidth); - sad += (data->lambda16 * d_mv_bits(x, y, zeroMV, 1, 0) * sad)>>10; + sad += (data->lambda16 * d_mv_bits(x, y, zeroMV, 1, 0)); if (data->chroma && sad < *data->iMinSAD) sad += ChromaSAD2((xcf >> 3) + roundtab_76[xcf & 0xf], @@ -304,7 +304,7 @@ data->qpel^data->qpel_precision); sad = sad16(data->Cur, Reference, data->iEdgedWidth, 256*4096); - sad += (data->lambda16 * t * sad)>>10; + sad += (data->lambda16 * t); if (data->chroma && sad < *data->iMinSAD) sad += xvid_me_ChromaSAD((xc >> 1) + roundtab_79[xc & 0x3], @@ -1081,7 +1081,7 @@ if (frame->vop_flags & XVID_VOP_RD_BVOP) ModeDecision_BVOP_RD(&Data_d, &Data_b, &Data_f, &Data_i, - pMB, b_mb, &f_predMV, &b_predMV, frame->motion_flags, pParam, i, j); + pMB, b_mb, &f_predMV, &b_predMV, frame->motion_flags, pParam, i, j, best_sad); else ModeDecision_BVOP_SAD(&Data_d, &Data_b, &Data_f, &Data_i, pMB, b_mb, &f_predMV, &b_predMV);