[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 890, Sat Feb 22 08:49:45 2003 UTC revision 926, Sun Mar 16 12:05:09 2003 UTC
# Line 999  Line 999 
999    
1000          uint32_t x, y;          uint32_t x, y;
1001          uint32_t iIntra = 0;          uint32_t iIntra = 0;
1002          int32_t quant = current->quant, sad00;      int32_t sad00;
1003    
1004          // some pre-initialized thingies for SearchP          // some pre-initialized thingies for SearchP
1005          int32_t temp[8];          int32_t temp[8];
# Line 1052  Line 1052 
1052    
1053                          sad00 = pMB->sad16;                          sad00 = pMB->sad16;
1054    
                         if (!(current->vop_flags & XVID_LUMIMASKING)) {  
                                 pMB->dquant = NO_CHANGE;  
                         } else {  
                                 if (pMB->dquant != NO_CHANGE) {  
                                         quant += DQtab[pMB->dquant];  
                                         if (quant > 31) quant = 31;  
                                         else if (quant < 1) quant = 1;  
                                 }  
                         }  
                         pMB->quant = current->quant;  
   
1055  //initial skip decision  //initial skip decision
1056  /* no early skip for GMC (global vector = skip vector is unknown!)  */  /* no early skip for GMC (global vector = skip vector is unknown!)  */
1057                          if (!(current->vol_flags & XVID_GMC))   { /* no fast SKIP for S(GMC)-VOPs */                          if (!(current->vol_flags & XVID_GMC))   { /* no fast SKIP for S(GMC)-VOPs */
1058                                  if (pMB->dquant == NO_CHANGE && sad00 < pMB->quant * INITIAL_SKIP_THRESH * (Data.rrv ? 4:1) )                                  if (pMB->dquant == 0 && sad00 < pMB->quant * INITIAL_SKIP_THRESH * (Data.rrv ? 4:1) )
1059                                          if (Data.chroma || SkipDecisionP(pCurrent, pRef, x, y, iEdgedWidth/2, pMB->quant, Data.rrv)) {                                          if (Data.chroma || SkipDecisionP(pCurrent, pRef, x, y, iEdgedWidth/2, pMB->quant, Data.rrv)) {
1060                                                  SkipMacroblockP(pMB, sad00);                                                  SkipMacroblockP(pMB, sad00);
1061                                                  continue;                                                  continue;
# Line 1080  Line 1069 
1069    
1070  /* final skip decision, a.k.a. "the vector you found, really that good?" */  /* final skip decision, a.k.a. "the vector you found, really that good?" */
1071                          if (!(current->vol_flags & XVID_GMC))   {                          if (!(current->vol_flags & XVID_GMC))   {
1072                                  if ( pMB->dquant == NO_CHANGE && sad00 < pMB->quant * MAX_SAD00_FOR_SKIP) {                                  if ( pMB->dquant == 0 && sad00 < pMB->quant * MAX_SAD00_FOR_SKIP) {
1073                                          if (!(current->vop_flags & XVID_MODEDECISION_BITS)) {                                          if (!(current->vop_flags & XVID_MODEDECISION_BITS)) {
1074                                                  if ( (100*pMB->sad16)/(sad00+1) > FINAL_SKIP_THRESH * (Data.rrv ? 4:1) )                                                  if ( (100*pMB->sad16)/(sad00+1) > FINAL_SKIP_THRESH * (Data.rrv ? 4:1) )
1075                                                          if (Data.chroma || SkipDecisionP(pCurrent, pRef, x, y, iEdgedWidth/2, pMB->quant, Data.rrv))                                                          if (Data.chroma || SkipDecisionP(pCurrent, pRef, x, y, iEdgedWidth/2, pMB->quant, Data.rrv))
# Line 1289  Line 1278 
1278          Data->lambda8 = lambda_vec8[iQuant];          Data->lambda8 = lambda_vec8[iQuant];
1279          Data->qpel_precision = 0;          Data->qpel_precision = 0;
1280    
1281          if (pMB->dquant != NO_CHANGE) inter4v = 0;          if (pMB->dquant != 0) inter4v = 0;
1282    
1283          for(i = 0; i < 5; i++)          for(i = 0; i < 5; i++)
1284                  Data->currentMV[i].x = Data->currentMV[i].y = 0;                  Data->currentMV[i].x = Data->currentMV[i].y = 0;
# Line 2063  Line 2052 
2052                          Data.Cur = frame->image.y + (j * Data.iEdgedWidth + i) * 16;                          Data.Cur = frame->image.y + (j * Data.iEdgedWidth + i) * 16;
2053                          Data.CurU = frame->image.u + (j * Data.iEdgedWidth/2 + i) * 8;                          Data.CurU = frame->image.u + (j * Data.iEdgedWidth/2 + i) * 8;
2054                          Data.CurV = frame->image.v + (j * Data.iEdgedWidth/2 + i) * 8;                          Data.CurV = frame->image.v + (j * Data.iEdgedWidth/2 + i) * 8;
                         pMB->quant = frame->quant;  
2055    
2056  /* direct search comes first, because it (1) checks for SKIP-mode  /* direct search comes first, because it (1) checks for SKIP-mode
2057          and (2) sets very good predictions for forward and backward search */          and (2) sets very good predictions for forward and backward search */

Legend:
Removed from v.890  
changed lines
  Added in v.926

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