[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 1071, Thu Jun 19 09:59:37 2003 UTC revision 1072, Thu Jun 19 10:06:40 2003 UTC
# Line 672  Line 672 
672    
673          bits += t = BITS_MULT*d_mv_bits(x, y, data->predMV, data->iFcode, data->qpel^data->qpel_precision, 0);          bits += t = BITS_MULT*d_mv_bits(x, y, data->predMV, data->iFcode, data->qpel^data->qpel_precision, 0);
674    
675            if (data->temp[0] + t < data->iMinSAD[1]) {
676                    data->iMinSAD[1] = data->temp[0] + t; current[1].x = x; current[1].y = y; }
677            if (data->temp[1] < data->iMinSAD[2]) {
678                    data->iMinSAD[2] = data->temp[1]; current[2].x = x; current[2].y = y; }
679            if (data->temp[2] < data->iMinSAD[3]) {
680                    data->iMinSAD[3] = data->temp[2]; current[3].x = x; current[3].y = y; }
681            if (data->temp[3] < data->iMinSAD[4]) {
682                    data->iMinSAD[4] = data->temp[3]; current[4].x = x; current[4].y = y; }
683    
684    
685          bits += BITS_MULT*xvid_cbpy_tab[15-(cbp>>2)].len;          bits += BITS_MULT*xvid_cbpy_tab[15-(cbp>>2)].len;
686    
687          if (bits >= data->iMinSAD[0]) return;          if (bits >= data->iMinSAD[0]) return;
# Line 699  Line 709 
709                  *dir = Direction;                  *dir = Direction;
710          }          }
711    
         if (data->temp[0] + t < data->iMinSAD[1]) {  
                 data->iMinSAD[1] = data->temp[0] + t; current[1].x = x; current[1].y = y; }  
         if (data->temp[1] < data->iMinSAD[2]) {  
                 data->iMinSAD[2] = data->temp[1]; current[2].x = x; current[2].y = y; }  
         if (data->temp[2] < data->iMinSAD[3]) {  
                 data->iMinSAD[3] = data->temp[2]; current[3].x = x; current[3].y = y; }  
         if (data->temp[3] < data->iMinSAD[4]) {  
                 data->iMinSAD[4] = data->temp[3]; current[4].x = x; current[4].y = y; }  
   
712  }  }
713    
714  static void  static void
715  CheckCandidateBits8(const int x, const int y, const int Direction, int * const dir, const SearchData * const data)  CheckCandidateBits8(const int x, const int y, const int Direction, int * const dir, const SearchData * const data)
716  {  {
# Line 1292  Line 1294 
1294          Data->iMinSAD[3] = pMB->sad8[2];          Data->iMinSAD[3] = pMB->sad8[2];
1295          Data->iMinSAD[4] = pMB->sad8[3];          Data->iMinSAD[4] = pMB->sad8[3];
1296    
1297          if ((!(GlobalFlags & XVID_MODEDECISION_BITS)) || (x | y)) {          if ((!(GlobalFlags & XVID_MODEDECISION_BITS)) && (x | y)) {
1298                  threshA = Data->temp[0]; // that's where we keep this SAD atm                  threshA = Data->temp[0]; // that's where we keep this SAD atm
1299                  if (threshA < 512) threshA = 512;                  if (threshA < 512) threshA = 512;
1300                  else if (threshA > 1024) threshA = 1024;                  else if (threshA > 1024) threshA = 1024;

Legend:
Removed from v.1071  
changed lines
  Added in v.1072

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