--- estimation_bvop.c 2004/07/21 15:47:51 1.13 +++ estimation_bvop.c 2004/10/12 21:08:41 1.16 @@ -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_bvop.c,v 1.13 2004/07/21 15:47:51 syskin Exp $ + * $Id: estimation_bvop.c,v 1.16 2004/10/12 21:08:41 edgomez Exp $ * ****************************************************************************/ @@ -541,15 +541,15 @@ b_dx = (b_dx >> 3) + roundtab_76[b_dx & 0xf]; sum = sad8bi(Data->CurU, - Data->RefP[4] + (dy/2) * stride + dx/2, - Data->b_RefP[4] + (b_dy/2) * stride + b_dx/2, + Data->RefP[4] + (dy/2) * (int)stride + dx/2, + Data->b_RefP[4] + (b_dy/2) * (int)stride + b_dx/2, stride); if (sum >= MAX_CHROMA_SAD_FOR_SKIP * (int)Data->iQuant) return; /* no skip */ sum += sad8bi(Data->CurV, - Data->RefP[5] + (dy/2) * stride + dx/2, - Data->b_RefP[5] + (b_dy/2) * stride + b_dx/2, + Data->RefP[5] + (dy/2) * (int)stride + dx/2, + Data->b_RefP[5] + (b_dy/2) * (int)stride + b_dx/2, stride); if (sum >= MAX_CHROMA_SAD_FOR_SKIP * (int)Data->iQuant) return; /* no skip */ @@ -643,6 +643,8 @@ Data->directmvB[0].y : Data->currentMV[1].y - Data->referencemv[0].y); + *best_sad = Data->iMinSAD[0]; + return skip_sad; } @@ -937,7 +939,8 @@ const IMAGE * const b_refHV) { uint32_t i, j; - int32_t best_sad, sad2; + int32_t best_sad = 256*4096; + int32_t sad2; uint32_t skip_sad; const MACROBLOCK * const b_mbs = b_reference->mbs;