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

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

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

revision 675, Sun Nov 24 16:38:11 2002 UTC revision 676, Mon Nov 25 13:38:56 2002 UTC
# Line 47  Line 47 
47  #define FINAL_SKIP_THRESH       (50)  #define FINAL_SKIP_THRESH       (50)
48  #define MAX_SAD00_FOR_SKIP      (20)  #define MAX_SAD00_FOR_SKIP      (20)
49  #define MAX_CHROMA_SAD_FOR_SKIP (22)  #define MAX_CHROMA_SAD_FOR_SKIP (22)
50  #define SKIP_THRESH_B (15)  #define SKIP_THRESH_B (25)
51    
52  #define CHECK_CANDIDATE(X,Y,D) { \  #define CHECK_CANDIDATE(X,Y,D) { \
53  (*CheckCandidate)((const int)(X),(const int)(Y), (D), &iDirection, data ); }  (*CheckCandidate)((const int)(X),(const int)(Y), (D), &iDirection, data ); }
# Line 1455  Line 1455 
1455    
1456          SubpelRefine(Data);          SubpelRefine(Data);
1457    
1458          *Data->iMinSAD +=  1 * Data->lambda16; // one bit is needed to code direct mode  //      *Data->iMinSAD +=  1 * Data->lambda16; // one bit is needed to code direct mode
1459          *best_sad = *Data->iMinSAD;          *best_sad = *Data->iMinSAD;
1460    
1461          if (b_mb->mode == MODE_INTER4V)          if (b_mb->mode == MODE_INTER4V)
# Line 1579  Line 1579 
1579    
1580          } while (!(iDirection));          } while (!(iDirection));
1581    
         *fData->iMinSAD +=  2 * fData->lambda16; // two bits are needed to code interpolate mode.  
   
1582          if (fData->qpel) {          if (fData->qpel) {
1583                  CheckCandidate = CheckCandidateInt;                  CheckCandidate = CheckCandidateInt;
1584                  fData->qpel_precision = bData.qpel_precision = 1;                  fData->qpel_precision = bData.qpel_precision = 1;
# Line 1595  Line 1593 
1593                  SubpelRefine(&bData);                  SubpelRefine(&bData);
1594          }          }
1595    
1596            *fData->iMinSAD +=  2 * fData->lambda16; // two bits are needed to code interpolate mode.
1597    
1598          if (*fData->iMinSAD < *best_sad) {          if (*fData->iMinSAD < *best_sad) {
1599                  *best_sad = *fData->iMinSAD;                  *best_sad = *fData->iMinSAD;
1600                  pMB->mvs[0] = fData->currentMV[0];                  pMB->mvs[0] = fData->currentMV[0];
# Line 1655  Line 1655 
1655          Data.iEdgedWidth = pParam->edged_width;          Data.iEdgedWidth = pParam->edged_width;
1656          Data.currentMV = currentMV; Data.currentQMV = currentQMV;          Data.currentMV = currentMV; Data.currentQMV = currentQMV;
1657          Data.iMinSAD = &iMinSAD;          Data.iMinSAD = &iMinSAD;
1658          Data.lambda16 = lambda_vec16[frame->quant];          Data.lambda16 = lambda_vec16[frame->quant] + 2;
1659          Data.qpel = pParam->m_quarterpel;          Data.qpel = pParam->m_quarterpel;
1660          Data.rounding = 0;          Data.rounding = 0;
1661    
# Line 1752  Line 1752 
1752                                  case MODE_DIRECT:                                  case MODE_DIRECT:
1753                                  case MODE_DIRECT_NO4V:                                  case MODE_DIRECT_NO4V:
1754                                          d_count++;                                          d_count++;
                                         break;  
1755                                  default:                                  default:
1756                                          break;                                          break;
1757                          }                          }

Legend:
Removed from v.675  
changed lines
  Added in v.676

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