[XviD-devel] Motion estimation and SAD

Melaneum melaneum at wanadoo.fr
Sat Apr 26 11:20:51 CEST 2003


Hi,

I'm looking at the motion estimation part of Xvid, in order to make a study
about influence of block size in compression rate.
In the motion_est.c file, while looking for the best MV, for example in
NO_CHECK_MV16_CANDIDATE:

#define NOCHECK_MV16_CANDIDATE(X,Y) { \
    iSAD = sad16( cur, get_ref(pRef, pRefH, pRefV, pRefHV, x, y, 16, X, Y,
iEdgedWidth),iEdgedWidth, iMinSAD); \
    iSAD += calc_delta_16((X) - center_x, (Y) - center_y, (uint8_t)iFcode,
iQuant);\
    if (iSAD < iMinSAD) \
    {  iMinSAD=iSAD; currMV->x=(X); currMV->y=(Y); } \
}

I don't get what calc_delta_16 represent, and why it has to be added for the
SAD.

Thanks for any explanation,

Manu



More information about the XviD-devel mailing list