[svn] / branches / dev-api-4 / xvidcore / src / motion / motion_est.c Repository:
ViewVC logotype

Diff of /branches/dev-api-4/xvidcore/src/motion/motion_est.c

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

revision 1054, Mon Jun 9 13:55:56 2003 UTC revision 1071, Thu Jun 19 09:59:37 2003 UTC
# Line 21  Line 21 
21   *  along with this program ; if not, write to the Free Software   *  along with this program ; if not, write to the Free Software
22   *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA   *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
23   *   *
24   * $Id: motion_est.c,v 1.58.2.17 2003-06-09 13:54:37 edgomez Exp $   * $Id: motion_est.c,v 1.58.2.18 2003-06-19 09:58:57 syskin Exp $
25   *   *
26   ****************************************************************************/   ****************************************************************************/
27    
# 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          bits += BITS_MULT*xvid_cbpy_tab[15-(cbp>>2)].len;          bits += BITS_MULT*xvid_cbpy_tab[15-(cbp>>2)].len;
685    
686          if (bits >= data->iMinSAD[0]) return;          if (bits >= data->iMinSAD[0]) return;
# Line 698  Line 707 
707                  current[0].x = x; current[0].y = y;                  current[0].x = x; current[0].y = y;
708                  *dir = Direction;                  *dir = Direction;
709          }          }
   
         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; }  
   
710  }  }
711    
712  static void  static void
713  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)
714  {  {
# Line 1290  Line 1290 
1290          Data->iMinSAD[3] = pMB->sad8[2];          Data->iMinSAD[3] = pMB->sad8[2];
1291          Data->iMinSAD[4] = pMB->sad8[3];          Data->iMinSAD[4] = pMB->sad8[3];
1292    
1293          if ((!(VopFlags & XVID_VOP_MODEDECISION_BITS)) || (x | y)) {          if ((!(VopFlags & XVID_VOP_MODEDECISION_BITS)) && (x | y)) {
1294                  threshA = Data->temp[0]; /* that's where we keep this SAD atm */                  threshA = Data->temp[0]; /* that's where we keep this SAD atm */
1295                  if (threshA < 512) threshA = 512;                  if (threshA < 512) threshA = 512;
1296                  else if (threshA > 1024) threshA = 1024;                  else if (threshA > 1024) threshA = 1024;

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

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