--- trunk/xvidcore/src/motion/motion_est.c 2003/04/14 13:00:57 985 +++ trunk/xvidcore/src/motion/motion_est.c 2003/05/03 10:05:55 1001 @@ -1388,7 +1388,7 @@ if ((Data->chroma) && (!(GlobalFlags & XVID_MODEDECISION_BITS))) { // chroma is only used for comparsion to INTER. if the comparsion will be done in BITS domain, there is no reason to compute it int sumx = 0, sumy = 0; - const int div = Data->qpel ? 2 : 0; + const int div = Data->qpel ? 2 : 1; const VECTOR * const mv = Data->qpel ? pMB->qmvs : pMB->mvs; for (i = 0; i < 4; i++) { @@ -2180,7 +2180,7 @@ } } -#define INTRA_THRESH 2050 +#define INTRA_THRESH 1800 #define INTER_THRESH 1200 int @@ -2210,10 +2210,10 @@ CheckCandidate = CheckCandidate32I; if (intraCount != 0 && intraCount < 10) // we're right after an I frame - IntraThresh += 8 * (intraCount - 10) * (intraCount - 10); + IntraThresh += 15 * (intraCount - 10) * (intraCount - 10); else if ( 5*(maxIntra - intraCount) < maxIntra) // we're close to maximum. 2 sec when max is 10 sec - IntraThresh -= (IntraThresh * (maxIntra - 5*(maxIntra - intraCount)))/maxIntra; + IntraThresh -= (IntraThresh * (maxIntra - 8*(maxIntra - intraCount)))/maxIntra; InterThresh -= (350 - 8*b_thresh) * bCount; if (InterThresh < 300 + 5*b_thresh) InterThresh = 300 + 5*b_thresh; @@ -2256,7 +2256,7 @@ sSAD /= blocks; s = (10*s) / blocks; - if (s > 4) sSAD += (s - 2) * (160 - 2*b_thresh); //static block - looks bad when in bframe... + if (s > 4) sSAD += (s - 2) * (60 - 2*b_thresh); //static block - looks bad when in bframe... if (sSAD > InterThresh ) return P_VOP; emms();