[svn] / trunk / xvidcore / src / motion / estimation_bvop.c Repository:
ViewVC logotype

Diff of /trunk/xvidcore/src/motion/estimation_bvop.c

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

revision 1515, Wed Jul 21 12:50:30 2004 UTC revision 1516, Wed Jul 21 14:52:22 2004 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: estimation_bvop.c,v 1.11 2004-07-21 12:50:30 syskin Exp $   * $Id: estimation_bvop.c,v 1.12 2004-07-21 14:52:22 syskin Exp $
25   *   *
26   ****************************************************************************/   ****************************************************************************/
27    
# Line 625  Line 625 
625                          return *Data->iMinSAD; /* skipped */                          return *Data->iMinSAD; /* skipped */
626          }          }
627    
628            if (Data->chroma && Data->chromaSAD >= MAX_CHROMA_SAD_FOR_SKIP * (int)Data->iQuant) /* chroma doesn't allow skip */
629                    skip_sad = 256*4096;
630            else
631          skip_sad = 4*MAX(MAX(Data->iMinSAD[1],Data->iMinSAD[2]), MAX(Data->iMinSAD[3],Data->iMinSAD[4]));          skip_sad = 4*MAX(MAX(Data->iMinSAD[1],Data->iMinSAD[2]), MAX(Data->iMinSAD[3],Data->iMinSAD[4]));
         if (Data->chroma) skip_sad += Data->chromaSAD;  
632    
633          Data->currentMV[1].x = Data->directmvF[0].x + Data->currentMV->x; /* hints for forward and backward searches */          Data->currentMV[1].x = Data->directmvF[0].x + Data->currentMV->x; /* hints for forward and backward searches */
634          Data->currentMV[1].y = Data->directmvF[0].y + Data->currentMV->y;          Data->currentMV[1].y = Data->directmvF[0].y + Data->currentMV->y;
# Line 1025  Line 1027 
1027                          if ((Data_d.iMinSAD[0] <= 2*best_sad) && (!frame->motion_flags&XVID_ME_SKIP_DELTASEARCH))                          if ((Data_d.iMinSAD[0] <= 2*best_sad) && (!frame->motion_flags&XVID_ME_SKIP_DELTASEARCH))
1028                                  SearchDirect_final(frame->motion_flags, b_mb, &best_sad, &Data_d);                                  SearchDirect_final(frame->motion_flags, b_mb, &best_sad, &Data_d);
1029    
   
1030                          /* final skip decision */                          /* final skip decision */
1031                          if ( (skip_sad < Data_d.iQuant * MAX_SAD00_FOR_SKIP )                          if ( (skip_sad < 2 * Data_d.iQuant * MAX_SAD00_FOR_SKIP )
1032                                  && ((100*best_sad)/(skip_sad+1) > FINAL_SKIP_THRESH) ) {                                  && ((100*best_sad)/(skip_sad+1) > FINAL_SKIP_THRESH) ) {
1033    
1034                                    if (!Data_d.chroma) { /* we still need to check chroma */
1035                                  SkipDecisionB(pMB, &Data_d);                                  SkipDecisionB(pMB, &Data_d);
1036                                  if (pMB->mode == MODE_DIRECT_NONE_MV) { /* skipped? */                                  if (pMB->mode == MODE_DIRECT_NONE_MV) { /* skipped? */
1037                                          pMB->sad16 = best_sad;                                                  pMB->sad16 = skip_sad;
1038                                                    continue;
1039                                            }
1040                                    } else { /* just SKIP */
1041                                            pMB->mode = MODE_DIRECT_NONE_MV;
1042                                            pMB->sad16 = skip_sad;
1043                                          continue;                                          continue;
1044                                  }                                  }
1045                          }                          }

Legend:
Removed from v.1515  
changed lines
  Added in v.1516

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