1535 |
bData.RefV = fData->bRefV = b_RefV + (x + y * iEdgedWidth) * 16; |
bData.RefV = fData->bRefV = b_RefV + (x + y * iEdgedWidth) * 16; |
1536 |
bData.RefHV = fData->bRefHV = b_RefHV + (x + y * iEdgedWidth) * 16; |
bData.RefHV = fData->bRefHV = b_RefHV + (x + y * iEdgedWidth) * 16; |
1537 |
bData.RefQ = fData->RefQ; |
bData.RefQ = fData->RefQ; |
1538 |
fData->qpel_precision = bData.qpel_precision = 0; |
fData->qpel_precision = bData.qpel_precision = 0; bData.qpel = fData->qpel; |
1539 |
bData.rounding = 0; |
bData.rounding = 0; |
1540 |
|
|
1541 |
bData.bpredMV = fData->predMV = *f_predMV; |
bData.bpredMV = fData->predMV = *f_predMV; |
1546 |
get_range(&bData.min_dx, &bData.max_dx, &bData.min_dy, &bData.max_dy, x, y, 16, pParam->width, pParam->height, bcode, pParam->m_quarterpel); |
get_range(&bData.min_dx, &bData.max_dx, &bData.min_dy, &bData.max_dy, x, y, 16, pParam->width, pParam->height, bcode, pParam->m_quarterpel); |
1547 |
|
|
1548 |
if (fData->currentMV[0].x > fData->max_dx) fData->currentMV[0].x = fData->max_dx; |
if (fData->currentMV[0].x > fData->max_dx) fData->currentMV[0].x = fData->max_dx; |
1549 |
if (fData->currentMV[0].x < fData->min_dx) fData->currentMV[0].x = fData->min_dy; |
if (fData->currentMV[0].x < fData->min_dx) fData->currentMV[0].x = fData->min_dx; |
1550 |
if (fData->currentMV[0].y > fData->max_dy) fData->currentMV[0].y = fData->max_dx; |
if (fData->currentMV[0].y > fData->max_dy) fData->currentMV[0].y = fData->max_dy; |
1551 |
if (fData->currentMV[0].y > fData->min_dy) fData->currentMV[0].y = fData->min_dy; |
if (fData->currentMV[0].y < fData->min_dy) fData->currentMV[0].y = fData->min_dy; |
1552 |
|
|
1553 |
if (fData->currentMV[1].x > bData.max_dx) fData->currentMV[1].x = bData.max_dx; |
if (fData->currentMV[1].x > bData.max_dx) fData->currentMV[1].x = bData.max_dx; |
1554 |
if (fData->currentMV[1].x < bData.min_dx) fData->currentMV[1].x = bData.min_dy; |
if (fData->currentMV[1].x < bData.min_dx) fData->currentMV[1].x = bData.min_dx; |
1555 |
if (fData->currentMV[1].y > bData.max_dy) fData->currentMV[1].y = bData.max_dx; |
if (fData->currentMV[1].y > bData.max_dy) fData->currentMV[1].y = bData.max_dy; |
1556 |
if (fData->currentMV[1].y > bData.min_dy) fData->currentMV[1].y = bData.min_dy; |
if (fData->currentMV[1].y < bData.min_dy) fData->currentMV[1].y = bData.min_dy; |
1557 |
|
|
1558 |
CheckCandidateInt(fData->currentMV[0].x, fData->currentMV[0].y, 255, &iDirection, fData); |
CheckCandidateInt(fData->currentMV[0].x, fData->currentMV[0].y, 255, &iDirection, fData); |
1559 |
|
|
1582 |
*fData->iMinSAD += 2 * fData->lambda16; // two bits are needed to code interpolate mode. |
*fData->iMinSAD += 2 * fData->lambda16; // two bits are needed to code interpolate mode. |
1583 |
|
|
1584 |
if (fData->qpel) { |
if (fData->qpel) { |
1585 |
|
CheckCandidate = CheckCandidateInt; |
1586 |
fData->qpel_precision = bData.qpel_precision = 1; |
fData->qpel_precision = bData.qpel_precision = 1; |
1587 |
get_range(&fData->min_dx, &fData->max_dx, &fData->min_dy, &fData->max_dy, x, y, 16, pParam->width, pParam->height, fcode, 0); |
get_range(&fData->min_dx, &fData->max_dx, &fData->min_dy, &fData->max_dy, x, y, 16, pParam->width, pParam->height, fcode, 0); |
1588 |
get_range(&bData.min_dx, &bData.max_dx, &bData.min_dy, &bData.max_dy, x, y, 16, pParam->width, pParam->height, bcode, 0); |
get_range(&bData.min_dx, &bData.max_dx, &bData.min_dy, &bData.max_dy, x, y, 16, pParam->width, pParam->height, bcode, 0); |