--- estimation_pvop.c 2004/04/22 13:39:33 1.5 +++ estimation_pvop.c 2004/07/08 07:12:54 1.8 @@ -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_pvop.c,v 1.5 2004/04/22 13:39:33 syskin Exp $ + * $Id: estimation_pvop.c,v 1.8 2004/07/08 07:12:54 syskin Exp $ * ****************************************************************************/ @@ -42,7 +42,7 @@ static const int xvid_me_lambda_vec8[32] = { 0 ,(int)(1.00235 * NEIGH_TEND_8X8 + 0.5), - (int)(1.15582 + NEIGH_TEND_8X8 + 0.5), (int)(1.31976*NEIGH_TEND_8X8 + 0.5), + (int)(1.15582*NEIGH_TEND_8X8 + 0.5), (int)(1.31976*NEIGH_TEND_8X8 + 0.5), (int)(1.49591*NEIGH_TEND_8X8 + 0.5), (int)(1.68601*NEIGH_TEND_8X8 + 0.5), (int)(1.89187*NEIGH_TEND_8X8 + 0.5), (int)(2.11542*NEIGH_TEND_8X8 + 0.5), (int)(2.35878*NEIGH_TEND_8X8 + 0.5), (int)(2.62429*NEIGH_TEND_8X8 + 0.5), @@ -530,7 +530,8 @@ if(!Data->qpel) { /* halfpel mode */ if (MotionFlags & XVID_ME_HALFPELREFINE8) - xvid_me_SubpelRefine(Data, CheckCandidate, 0); /* perform halfpel refine of current best vector */ + /* perform halfpel refine of current best vector */ + xvid_me_SubpelRefine(Data->currentMV[0], Data, CheckCandidate, 0); } else { /* qpel mode */ Data->currentQMV->x = 2*Data->currentMV->x; @@ -544,7 +545,7 @@ } else if(MotionFlags & XVID_ME_QUARTERPELREFINE8) { /* full */ if (MotionFlags & XVID_ME_HALFPELREFINE8) { - xvid_me_SubpelRefine(Data, CheckCandidate8, 0); /* hpel part */ + xvid_me_SubpelRefine(Data->currentMV[0], Data, CheckCandidate8, 0); /* hpel part */ Data->currentQMV->x = 2*Data->currentMV->x; Data->currentQMV->y = 2*Data->currentMV->y; } @@ -553,7 +554,7 @@ pParam->width, pParam->height, Data->iFcode, 2, 0); Data->qpel_precision = 1; - xvid_me_SubpelRefine(Data, CheckCandidate8, 0); /* qpel part */ + xvid_me_SubpelRefine(Data->currentQMV[0], Data, CheckCandidate8, 0); /* qpel part */ } } @@ -722,7 +723,7 @@ if(!Data->qpel) { /* halfpel mode */ if (MotionFlags & XVID_ME_HALFPELREFINE16) - xvid_me_SubpelRefine(Data, CheckCandidate, 0); + xvid_me_SubpelRefine(Data->currentMV[0], Data, CheckCandidate, 0); } else { /* qpel mode */ @@ -739,7 +740,7 @@ if(MotionFlags & (XVID_ME_QUARTERPELREFINE16 | XVID_ME_QUARTERPELREFINE16_RD)) { /* full */ if (MotionFlags & XVID_ME_HALFPELREFINE16) { - xvid_me_SubpelRefine(Data, CheckCandidate, 0); /* hpel part */ + xvid_me_SubpelRefine(Data->currentMV[0], Data, CheckCandidate, 0); /* hpel part */ for(i = 0; i < 5; i++) { Data->currentQMV[i].x = 2 * Data->currentMV[i].x; Data->currentQMV[i].y = 2 * Data->currentMV[i].y; @@ -749,7 +750,7 @@ pParam->width, pParam->height, Data->iFcode, 2, 0); Data->qpel_precision = 1; if(MotionFlags & XVID_ME_QUARTERPELREFINE16) - xvid_me_SubpelRefine(Data, CheckCandidate, 0); /* qpel part */ + xvid_me_SubpelRefine(Data->currentQMV[0], Data, CheckCandidate, 0); /* qpel part */ } } } @@ -909,8 +910,6 @@ sad00 += Data.chromaSAD; } - sad00 = 4*MAX(MAX(pMB->sad8[0], pMB->sad8[1]), MAX(pMB->sad8[2], pMB->sad8[3])); - /* initial skip decision */ /* no early skip for GMC (global vector = skip vector is unknown!) */ if (current->coding_type != S_VOP) { /* no fast SKIP for S(GMC)-VOPs */