[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 1505, Sun Jul 18 11:22:24 2004 UTC revision 1506, Sun Jul 18 11:51:44 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.9 2004-07-10 17:42:18 edgomez Exp $   * $Id: estimation_bvop.c,v 1.10 2004-07-18 11:48:08 syskin Exp $
25   *   *
26   ****************************************************************************/   ****************************************************************************/
27    
# Line 375  Line 375 
375          Data_d->CurU = Data_f->CurU = Data_b->CurU = Data_i->CurU = Cur[1];          Data_d->CurU = Data_f->CurU = Data_b->CurU = Data_i->CurU = Cur[1];
376          Data_d->CurV = Data_f->CurV = Data_b->CurV = Data_i->CurV = Cur[2];          Data_d->CurV = Data_f->CurV = Data_b->CurV = Data_i->CurV = Cur[2];
377    
378          Data_d->lambda16 = lambda/4;          Data_d->lambda16 = lambda;
379          Data_f->lambda16 = Data_b->lambda16 = Data_i->lambda16 = lambda;          Data_f->lambda16 = Data_b->lambda16 = Data_i->lambda16 = lambda;
380    
381          /* reset chroma-sad cache */          /* reset chroma-sad cache */
# Line 944  Line 944 
944    
945          const int32_t TRB = time_pp - time_bp;          const int32_t TRB = time_pp - time_bp;
946          const int32_t TRD = time_pp;          const int32_t TRD = time_pp;
947            DECLARE_ALIGNED_MATRIX(dct_space, 3, 64, int16_t, CACHE_LINE);
948    
949          /* some pre-inintialized data for the rest of the search */          /* some pre-inintialized data for the rest of the search */
950          SearchData Data_d, Data_f, Data_b, Data_i;          SearchData Data_d, Data_f, Data_b, Data_i;
# Line 954  Line 955 
955          Data_d.rounding = 0;          Data_d.rounding = 0;
956          Data_d.chroma = frame->motion_flags & XVID_ME_CHROMA_BVOP;          Data_d.chroma = frame->motion_flags & XVID_ME_CHROMA_BVOP;
957          Data_d.iQuant = frame->quant;          Data_d.iQuant = frame->quant;
958            Data_d.dctSpace = dct_space;
959            Data_d.quant_type = !(pParam->vol_flags & XVID_VOL_MPEGQUANT);
960            Data_d.mpeg_quant_matrices = pParam->mpeg_quant_matrices;
961    
962          Data_d.RefQ = f_refV->u; /* a good place, also used in MC (for similar purpose) */          Data_d.RefQ = f_refV->u; /* a good place, also used in MC (for similar purpose) */
963    
# Line 1006  Line 1010 
1010    
1011                          sad2 = best_sad;                          sad2 = best_sad;
1012    
1013                          if (Data_f.iMinSAD[0] < 2*sad2+1500)                          if (Data_f.iMinSAD[0] < 2*sad2+2000)
1014                                  SearchBF_final(i, j, frame->motion_flags, pParam, &best_sad, &Data_f);                                  SearchBF_final(i, j, frame->motion_flags, pParam, &best_sad, &Data_f);
1015    
1016                          if (Data_b.iMinSAD[0] < 2*sad2+1500)                          if (Data_b.iMinSAD[0] < 2*sad2+2000)
1017                                  SearchBF_final(i, j, frame->motion_flags, pParam, &best_sad, &Data_b);                                  SearchBF_final(i, j, frame->motion_flags, pParam, &best_sad, &Data_b);
1018    
1019                          SearchInterpolate_initial(i, j, frame->motion_flags, pParam, &f_predMV, &b_predMV, &best_sad,                          SearchInterpolate_initial(i, j, frame->motion_flags, pParam, &f_predMV, &b_predMV, &best_sad,
# Line 1020  Line 1024 
1024    
1025                                  SearchInterpolate_final(i, j, frame->motion_flags, pParam, &best_sad, &Data_i);                                  SearchInterpolate_final(i, j, frame->motion_flags, pParam, &best_sad, &Data_i);
1026    
1027                            if ((Data_d.iMinSAD[0] <= 2*best_sad) && (!frame->motion_flags&XVID_ME_SKIP_DELTASEARCH))
                         if ((Data_d.iMinSAD[0] <= 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    
# Line 1036  Line 1039 
1039                                  }                                  }
1040                          }                          }
1041    
1042                            if (frame->vop_flags & XVID_VOP_RD_BVOP)
1043                                    ModeDecision_BVOP_RD(&Data_d, &Data_b, &Data_f, &Data_i,
1044                                            pMB, b_mb, &f_predMV, &b_predMV, frame->motion_flags, pParam, i, j);
1045                            else
1046                          ModeDecision_BVOP_SAD(&Data_d, &Data_b, &Data_f, &Data_i, pMB, b_mb, &f_predMV, &b_predMV);                          ModeDecision_BVOP_SAD(&Data_d, &Data_b, &Data_f, &Data_i, pMB, b_mb, &f_predMV, &b_predMV);
1047    
1048                  }                  }

Legend:
Removed from v.1505  
changed lines
  Added in v.1506

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