528 |
const int32_t iEdgedWidth = pParam->edged_width; |
const int32_t iEdgedWidth = pParam->edged_width; |
529 |
const uint8_t * cur = pCur->y + x*16 + y*16*iEdgedWidth; |
const uint8_t * cur = pCur->y + x*16 + y*16*iEdgedWidth; |
530 |
int32_t iSAD; |
int32_t iSAD; |
531 |
int32_t pred_x,pred_y; |
VECTOR pred; |
532 |
|
|
533 |
get_pmv(pMBs, x, y, pParam->mb_width, 0, &pred_x, &pred_y); |
|
534 |
|
pred = get_pmv2(pMBs, pParam->mb_width, 0, x, y, 0); |
535 |
|
|
536 |
iSAD = sad16( cur, |
iSAD = sad16( cur, |
537 |
get_ref(pRef, pRefH, pRefV, pRefHV, x, y, 16, 0,0, iEdgedWidth), |
get_ref(pRef, pRefH, pRefV, pRefHV, x, y, 16, 0,0, iEdgedWidth), |
541 |
|
|
542 |
currMV->x = 0; |
currMV->x = 0; |
543 |
currMV->y = 0; |
currMV->y = 0; |
544 |
currPMV->x = -pred_x; |
currPMV->x = -pred.x; |
545 |
currPMV->y = -pred_y; |
currPMV->y = -pred.y; |
546 |
|
|
547 |
return iSAD; |
return iSAD; |
548 |
|
|
1282 |
|
|
1283 |
/* because we might use something like IF (dx>max_dx) THEN dx=max_dx; */ |
/* because we might use something like IF (dx>max_dx) THEN dx=max_dx; */ |
1284 |
bPredEq = get_pmvdata(pMBs, x, y, iWcount, 0, pmv, psad); |
bPredEq = get_pmvdata(pMBs, x, y, iWcount, 0, pmv, psad); |
1285 |
|
// bPredEq = get_pmvdata2(pMBs, iWcount, 0, x, y, 0, pmv, psad); |
1286 |
|
|
1287 |
if ((x == 0) && (y == 0)) { |
if ((x == 0) && (y == 0)) { |
1288 |
threshA = 512; |
threshA = 512; |
1700 |
} |
} |
1701 |
|
|
1702 |
/* because we might use IF (dx>max_dx) THEN dx=max_dx; */ |
/* because we might use IF (dx>max_dx) THEN dx=max_dx; */ |
1703 |
bPredEq = |
bPredEq = get_pmvdata(pMBs, (x >> 1), (y >> 1), iWcount, iSubBlock, pmv, psad); |
1704 |
get_pmvdata(pMBs, (x >> 1), (y >> 1), iWcount, iSubBlock, pmv, psad); |
// bPredEq = get_pmvdata2(pMBs, iWcount, 0, (x >> 1), (y >> 1), iSubBlock, pmv, psad); |
1705 |
|
|
1706 |
if ((x == 0) && (y == 0)) { |
if ((x == 0) && (y == 0)) { |
1707 |
threshA = 512 / 4; |
threshA = 512 / 4; |
2012 |
} |
} |
2013 |
/* because we might use something like IF (dx>max_dx) THEN dx=max_dx; */ |
/* because we might use something like IF (dx>max_dx) THEN dx=max_dx; */ |
2014 |
bPredEq = get_pmvdata(pMBs, x, y, iWcount, 0, pmv, psad); |
bPredEq = get_pmvdata(pMBs, x, y, iWcount, 0, pmv, psad); |
2015 |
|
// bPredEq = get_pmvdata2(pMBs, iWcount, 0, x, y, 0, pmv, psad); |
2016 |
|
|
2017 |
/* Step 4: Calculate SAD around the Median prediction. |
/* Step 4: Calculate SAD around the Median prediction. |
2018 |
MinSAD=SAD |
MinSAD=SAD |
2291 |
} |
} |
2292 |
/* because we might use something like IF (dx>max_dx) THEN dx=max_dx; */ |
/* because we might use something like IF (dx>max_dx) THEN dx=max_dx; */ |
2293 |
bPredEq = get_pmvdata(pMBs, x >> 1, y >> 1, iWcount, iSubBlock, pmv, psad); |
bPredEq = get_pmvdata(pMBs, x >> 1, y >> 1, iWcount, iSubBlock, pmv, psad); |
2294 |
|
// bPredEq = get_pmvdata2(pMBs, iWcount, 0, x >> 1, y >> 1, iSubBlock, pmv, psad); |
2295 |
|
|
2296 |
|
|
2297 |
/* Step 4: Calculate SAD around the Median prediction. |
/* Step 4: Calculate SAD around the Median prediction. |