[svn] / trunk / xvidcore / src / motion / motion_est.c Repository:
ViewVC logotype

Diff of /trunk/xvidcore/src/motion/motion_est.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 985, Mon Apr 14 13:00:57 2003 UTC revision 1001, Sat May 3 10:05:55 2003 UTC
# Line 1388  Line 1388 
1388                  if ((Data->chroma) && (!(GlobalFlags & XVID_MODEDECISION_BITS))) {                  if ((Data->chroma) && (!(GlobalFlags & XVID_MODEDECISION_BITS))) {
1389                          // chroma is only used for comparsion to INTER. if the comparsion will be done in BITS domain, there is no reason to compute it                          // chroma is only used for comparsion to INTER. if the comparsion will be done in BITS domain, there is no reason to compute it
1390                          int sumx = 0, sumy = 0;                          int sumx = 0, sumy = 0;
1391                          const int div = Data->qpel ? 2 : 0;                          const int div = Data->qpel ? 2 : 1;
1392                          const VECTOR * const mv = Data->qpel ? pMB->qmvs : pMB->mvs;                          const VECTOR * const mv = Data->qpel ? pMB->qmvs : pMB->mvs;
1393    
1394                          for (i = 0; i < 4; i++) {                          for (i = 0; i < 4; i++) {
# Line 2180  Line 2180 
2180          }          }
2181  }  }
2182    
2183  #define INTRA_THRESH    2050  #define INTRA_THRESH    1800
2184  #define INTER_THRESH    1200  #define INTER_THRESH    1200
2185    
2186  int  int
# Line 2210  Line 2210 
2210          CheckCandidate = CheckCandidate32I;          CheckCandidate = CheckCandidate32I;
2211    
2212          if (intraCount != 0 && intraCount < 10) // we're right after an I frame          if (intraCount != 0 && intraCount < 10) // we're right after an I frame
2213                  IntraThresh += 8 * (intraCount - 10) * (intraCount - 10);                  IntraThresh += 15 * (intraCount - 10) * (intraCount - 10);
2214          else          else
2215                  if ( 5*(maxIntra - intraCount) < maxIntra) // we're close to maximum. 2 sec when max is 10 sec                  if ( 5*(maxIntra - intraCount) < maxIntra) // we're close to maximum. 2 sec when max is 10 sec
2216                          IntraThresh -= (IntraThresh * (maxIntra - 5*(maxIntra - intraCount)))/maxIntra;                          IntraThresh -= (IntraThresh * (maxIntra - 8*(maxIntra - intraCount)))/maxIntra;
2217    
2218          InterThresh -= (350 - 8*b_thresh) * bCount;          InterThresh -= (350 - 8*b_thresh) * bCount;
2219          if (InterThresh < 300 + 5*b_thresh) InterThresh = 300 + 5*b_thresh;          if (InterThresh < 300 + 5*b_thresh) InterThresh = 300 + 5*b_thresh;
# Line 2256  Line 2256 
2256          sSAD /= blocks;          sSAD /= blocks;
2257          s = (10*s) / blocks;          s = (10*s) / blocks;
2258    
2259          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...
2260    
2261          if (sSAD > InterThresh ) return P_VOP;          if (sSAD > InterThresh ) return P_VOP;
2262          emms();          emms();

Legend:
Removed from v.985  
changed lines
  Added in v.1001

No admin address has been configured
ViewVC Help
Powered by ViewVC 1.0.4