42 |
|
|
43 |
static const int xvid_me_lambda_vec8[32] = |
static const int xvid_me_lambda_vec8[32] = |
44 |
{ 0 ,(int)(1.00235 * NEIGH_TEND_8X8 + 0.5), |
{ 0 ,(int)(1.00235 * NEIGH_TEND_8X8 + 0.5), |
45 |
(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), |
46 |
(int)(1.49591*NEIGH_TEND_8X8 + 0.5), (int)(1.68601*NEIGH_TEND_8X8 + 0.5), |
(int)(1.49591*NEIGH_TEND_8X8 + 0.5), (int)(1.68601*NEIGH_TEND_8X8 + 0.5), |
47 |
(int)(1.89187*NEIGH_TEND_8X8 + 0.5), (int)(2.11542*NEIGH_TEND_8X8 + 0.5), |
(int)(1.89187*NEIGH_TEND_8X8 + 0.5), (int)(2.11542*NEIGH_TEND_8X8 + 0.5), |
48 |
(int)(2.35878*NEIGH_TEND_8X8 + 0.5), (int)(2.62429*NEIGH_TEND_8X8 + 0.5), |
(int)(2.35878*NEIGH_TEND_8X8 + 0.5), (int)(2.62429*NEIGH_TEND_8X8 + 0.5), |
530 |
if(!Data->qpel) { |
if(!Data->qpel) { |
531 |
/* halfpel mode */ |
/* halfpel mode */ |
532 |
if (MotionFlags & XVID_ME_HALFPELREFINE8) |
if (MotionFlags & XVID_ME_HALFPELREFINE8) |
533 |
xvid_me_SubpelRefine(Data, CheckCandidate, 0); /* perform halfpel refine of current best vector */ |
/* perform halfpel refine of current best vector */ |
534 |
|
xvid_me_SubpelRefine(Data->currentMV[0], Data, CheckCandidate, 0); |
535 |
} else { |
} else { |
536 |
/* qpel mode */ |
/* qpel mode */ |
537 |
Data->currentQMV->x = 2*Data->currentMV->x; |
Data->currentQMV->x = 2*Data->currentMV->x; |
545 |
} else if(MotionFlags & XVID_ME_QUARTERPELREFINE8) { |
} else if(MotionFlags & XVID_ME_QUARTERPELREFINE8) { |
546 |
/* full */ |
/* full */ |
547 |
if (MotionFlags & XVID_ME_HALFPELREFINE8) { |
if (MotionFlags & XVID_ME_HALFPELREFINE8) { |
548 |
xvid_me_SubpelRefine(Data, CheckCandidate8, 0); /* hpel part */ |
xvid_me_SubpelRefine(Data->currentMV[0], Data, CheckCandidate8, 0); /* hpel part */ |
549 |
Data->currentQMV->x = 2*Data->currentMV->x; |
Data->currentQMV->x = 2*Data->currentMV->x; |
550 |
Data->currentQMV->y = 2*Data->currentMV->y; |
Data->currentQMV->y = 2*Data->currentMV->y; |
551 |
} |
} |
554 |
pParam->width, pParam->height, Data->iFcode, 2, 0); |
pParam->width, pParam->height, Data->iFcode, 2, 0); |
555 |
Data->qpel_precision = 1; |
Data->qpel_precision = 1; |
556 |
|
|
557 |
xvid_me_SubpelRefine(Data, CheckCandidate8, 0); /* qpel part */ |
xvid_me_SubpelRefine(Data->currentQMV[0], Data, CheckCandidate8, 0); /* qpel part */ |
558 |
} |
} |
559 |
} |
} |
560 |
|
|
723 |
if(!Data->qpel) { |
if(!Data->qpel) { |
724 |
/* halfpel mode */ |
/* halfpel mode */ |
725 |
if (MotionFlags & XVID_ME_HALFPELREFINE16) |
if (MotionFlags & XVID_ME_HALFPELREFINE16) |
726 |
xvid_me_SubpelRefine(Data, CheckCandidate, 0); |
xvid_me_SubpelRefine(Data->currentMV[0], Data, CheckCandidate, 0); |
727 |
} else { |
} else { |
728 |
/* qpel mode */ |
/* qpel mode */ |
729 |
|
|
740 |
if(MotionFlags & (XVID_ME_QUARTERPELREFINE16 | XVID_ME_QUARTERPELREFINE16_RD)) { |
if(MotionFlags & (XVID_ME_QUARTERPELREFINE16 | XVID_ME_QUARTERPELREFINE16_RD)) { |
741 |
/* full */ |
/* full */ |
742 |
if (MotionFlags & XVID_ME_HALFPELREFINE16) { |
if (MotionFlags & XVID_ME_HALFPELREFINE16) { |
743 |
xvid_me_SubpelRefine(Data, CheckCandidate, 0); /* hpel part */ |
xvid_me_SubpelRefine(Data->currentMV[0], Data, CheckCandidate, 0); /* hpel part */ |
744 |
for(i = 0; i < 5; i++) { |
for(i = 0; i < 5; i++) { |
745 |
Data->currentQMV[i].x = 2 * Data->currentMV[i].x; |
Data->currentQMV[i].x = 2 * Data->currentMV[i].x; |
746 |
Data->currentQMV[i].y = 2 * Data->currentMV[i].y; |
Data->currentQMV[i].y = 2 * Data->currentMV[i].y; |
750 |
pParam->width, pParam->height, Data->iFcode, 2, 0); |
pParam->width, pParam->height, Data->iFcode, 2, 0); |
751 |
Data->qpel_precision = 1; |
Data->qpel_precision = 1; |
752 |
if(MotionFlags & XVID_ME_QUARTERPELREFINE16) |
if(MotionFlags & XVID_ME_QUARTERPELREFINE16) |
753 |
xvid_me_SubpelRefine(Data, CheckCandidate, 0); /* qpel part */ |
xvid_me_SubpelRefine(Data->currentQMV[0], Data, CheckCandidate, 0); /* qpel part */ |
754 |
} |
} |
755 |
} |
} |
756 |
} |
} |