[cvs] / xvidcore / src / motion / estimation_common.c Repository:
ViewVC logotype

Diff of /xvidcore/src/motion/estimation_common.c

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

revision 1.7, Sun Oct 3 14:37:18 2004 UTC revision 1.8, Sun Oct 3 14:49:34 2004 UTC
# Line 323  Line 323 
323    
324          unsigned int * const iDirection = &data->dir;          unsigned int * const iDirection = &data->dir;
325    
326          do {          for (;;) {
327                  *iDirection = 0;                  *iDirection = 0;
328                  if (bDirection & 1) CHECK_CANDIDATE(x - iDiamondSize, y, 1);                  if (bDirection & 1) CHECK_CANDIDATE(x - iDiamondSize, y, 1);
329                  if (bDirection & 2) CHECK_CANDIDATE(x + iDiamondSize, y, 2);                  if (bDirection & 2) CHECK_CANDIDATE(x + iDiamondSize, y, 2);
330                  if (bDirection & 4) CHECK_CANDIDATE(x, y - iDiamondSize, 4);                  if (bDirection & 4) CHECK_CANDIDATE(x, y - iDiamondSize, 4);
331                  if (bDirection & 8) CHECK_CANDIDATE(x, y + iDiamondSize, 8);                  if (bDirection & 8) CHECK_CANDIDATE(x, y + iDiamondSize, 8);
332    
333                    if (*iDirection == 0)
334                            break;
335    
336                  /* now we're doing diagonal checks near our candidate */                  /* now we're doing diagonal checks near our candidate */
337                  bDirection = *iDirection;                  bDirection = *iDirection;
                 if (*iDirection) {              /* checking if anything found */  
338                          x = data->currentMV->x; y = data->currentMV->y;                          x = data->currentMV->x; y = data->currentMV->y;
339                          if (bDirection & 3) {   /* our candidate is left or right */                          if (bDirection & 3) {   /* our candidate is left or right */
                                 *iDirection=4+8;  
340                                  CHECK_CANDIDATE(x, y + iDiamondSize, 8);                                  CHECK_CANDIDATE(x, y + iDiamondSize, 8);
341                                  CHECK_CANDIDATE(x, y - iDiamondSize, 4);                                  CHECK_CANDIDATE(x, y - iDiamondSize, 4);
342                          } else {                        /* what remains here is up or down */                          } else {                        /* what remains here is up or down */
                                 *iDirection=1+2;  
343                                  CHECK_CANDIDATE(x + iDiamondSize, y, 2);                                  CHECK_CANDIDATE(x + iDiamondSize, y, 2);
344                                  CHECK_CANDIDATE(x - iDiamondSize, y, 1);                                  CHECK_CANDIDATE(x - iDiamondSize, y, 1);
345                          }                          }
346                          bDirection += *iDirection;                  bDirection |= *iDirection;
347                          x = data->currentMV->x; y = data->currentMV->y;                          x = data->currentMV->x; y = data->currentMV->y;
348                  }                  }
349          }          }
         while (bDirection);  
 }  
350    
351  void  void
352  xvid_me_SubpelRefine(VECTOR centerMV, SearchData * const data, CheckFunc * const CheckCandidate, int dir)  xvid_me_SubpelRefine(VECTOR centerMV, SearchData * const data, CheckFunc * const CheckCandidate, int dir)

Legend:
Removed from v.1.7  
changed lines
  Added in v.1.8

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