21 |
* along with this program ; if not, write to the Free Software |
* along with this program ; if not, write to the Free Software |
22 |
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
23 |
* |
* |
24 |
* $Id: estimation_bvop.c,v 1.10 2004-07-18 11:48:08 syskin Exp $ |
* $Id: estimation_bvop.c,v 1.11 2004-07-21 12:50:30 syskin Exp $ |
25 |
* |
* |
26 |
****************************************************************************/ |
****************************************************************************/ |
27 |
|
|
375 |
Data_d->CurU = Data_f->CurU = Data_b->CurU = Data_i->CurU = Cur[1]; |
Data_d->CurU = Data_f->CurU = Data_b->CurU = Data_i->CurU = Cur[1]; |
376 |
Data_d->CurV = Data_f->CurV = Data_b->CurV = Data_i->CurV = Cur[2]; |
Data_d->CurV = Data_f->CurV = Data_b->CurV = Data_i->CurV = Cur[2]; |
377 |
|
|
378 |
Data_d->lambda16 = lambda; |
Data_d->lambda16 = Data_f->lambda16 = Data_b->lambda16 = Data_i->lambda16 = lambda; |
|
Data_f->lambda16 = Data_b->lambda16 = Data_i->lambda16 = lambda; |
|
379 |
|
|
380 |
/* reset chroma-sad cache */ |
/* reset chroma-sad cache */ |
381 |
Data_d->b_chromaX = Data_d->b_chromaY = Data_d->chromaX = Data_d->chromaY = Data_d->chromaSAD = 256*4096; |
Data_d->b_chromaX = Data_d->b_chromaY = Data_d->chromaX = Data_d->chromaY = Data_d->chromaSAD = 256*4096; |
400 |
const uint32_t mode_curr, |
const uint32_t mode_curr, |
401 |
const VECTOR hint) |
const VECTOR hint) |
402 |
{ |
{ |
|
|
|
403 |
/* [0] is prediction */ |
/* [0] is prediction */ |
404 |
pmv[0].x = (pmv[0].x); pmv[0].y = (pmv[0].y); |
/* [1] is zero */ |
405 |
|
pmv[1].x = pmv[1].y = 0; |
|
pmv[1].x = pmv[1].y = 0; /* [1] is zero */ |
|
406 |
|
|
407 |
pmv[2].x = hint.x; pmv[2].y = hint.y; |
pmv[2].x = hint.x; pmv[2].y = hint.y; |
408 |
|
|
614 |
|
|
615 |
CheckCandidateDirect(0, 0, Data, 255); /* will also fill iMinSAD[1..4] with 8x8 SADs */ |
CheckCandidateDirect(0, 0, Data, 255); /* will also fill iMinSAD[1..4] with 8x8 SADs */ |
616 |
|
|
|
|
|
617 |
/* initial (fast) skip decision */ |
/* initial (fast) skip decision */ |
618 |
if (Data->iMinSAD[1] < (int)Data->iQuant * INITIAL_SKIP_THRESH |
if (Data->iMinSAD[1] < (int)Data->iQuant * INITIAL_SKIP_THRESH |
619 |
&& Data->iMinSAD[2] < (int)Data->iQuant * INITIAL_SKIP_THRESH |
&& Data->iMinSAD[2] < (int)Data->iQuant * INITIAL_SKIP_THRESH |
871 |
*f_predMV = Data_f->currentMV[0]; |
*f_predMV = Data_f->currentMV[0]; |
872 |
} |
} |
873 |
pMB->mvs[0] = *Data_f->currentMV; |
pMB->mvs[0] = *Data_f->currentMV; |
874 |
|
pMB->b_mvs[0] = *Data_b->currentMV; /* hint for future searches */ |
875 |
break; |
break; |
876 |
|
|
877 |
case MODE_BACKWARD: |
case MODE_BACKWARD: |
886 |
*b_predMV = Data_b->currentMV[0]; |
*b_predMV = Data_b->currentMV[0]; |
887 |
} |
} |
888 |
pMB->b_mvs[0] = *Data_b->currentMV; |
pMB->b_mvs[0] = *Data_b->currentMV; |
889 |
|
pMB->mvs[0] = *Data_f->currentMV; /* hint for future searches */ |
890 |
break; |
break; |
891 |
|
|
892 |
|
|