[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 851, Sat Feb 15 15:22:19 2003 UTC revision 872, Wed Feb 19 20:12:43 2003 UTC
# Line 46  Line 46 
46  #include "../utils/emms.h"  #include "../utils/emms.h"
47  #include "../dct/fdct.h"  #include "../dct/fdct.h"
48    
49    /*****************************************************************************
50     * Modified rounding tables -- declared in motion.h
51     * Original tables see ISO spec tables 7-6 -> 7-9
52     ****************************************************************************/
53    
54    const uint32_t roundtab[16] =
55    {0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2 };
56    
57    /* K = 4 */
58    const uint32_t roundtab_76[16] =
59    { 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1 };
60    
61    /* K = 2 */
62    const uint32_t roundtab_78[8] =
63    { 0, 0, 1, 1, 0, 0, 0, 1  };
64    
65    /* K = 1 */
66    const uint32_t roundtab_79[4] =
67    { 0, 1, 0, 0 };
68    
69  #define INITIAL_SKIP_THRESH     (10)  #define INITIAL_SKIP_THRESH     (10)
70  #define FINAL_SKIP_THRESH       (50)  #define FINAL_SKIP_THRESH       (50)
71  #define MAX_SAD00_FOR_SKIP      (20)  #define MAX_SAD00_FOR_SKIP      (20)
# Line 54  Line 74 
74  #define CHECK_CANDIDATE(X,Y,D) { \  #define CHECK_CANDIDATE(X,Y,D) { \
75  CheckCandidate((X),(Y), (D), &iDirection, data ); }  CheckCandidate((X),(Y), (D), &iDirection, data ); }
76    
77    /*****************************************************************************
78     * Code
79     ****************************************************************************/
80    
81  static __inline uint32_t  static __inline uint32_t
82  d_mv_bits(int x, int y, const VECTOR pred, const uint32_t iFcode, const int qpel, const int rrv)  d_mv_bits(int x, int y, const VECTOR pred, const uint32_t iFcode, const int qpel, const int rrv)
83  {  {
# Line 1154  Line 1178 
1178          int mode = MODE_INTER;          int mode = MODE_INTER;
1179    
1180          if (!(GlobalFlags & XVID_MODEDECISION_BITS)) { //normal, fast, SAD-based mode decision          if (!(GlobalFlags & XVID_MODEDECISION_BITS)) { //normal, fast, SAD-based mode decision
1181                  int intra = 0;  //              int intra = 0;
1182                  int sad;                  int sad;
1183                  int InterBias = MV16_INTER_BIAS;                  int InterBias = MV16_INTER_BIAS;
1184                  if (inter4v == 0 || Data->iMinSAD[0] < Data->iMinSAD[1] + Data->iMinSAD[2] +                  if (inter4v == 0 || Data->iMinSAD[0] < Data->iMinSAD[1] + Data->iMinSAD[2] +
# Line 2271  Line 2295 
2295          double meanx,meany;          double meanx,meany;
2296          int num,oldnum;          int num,oldnum;
2297    
2298          if (!MBmask) { fprintf(stderr,"Mem error\n"); return gmc;}          if (!MBmask) { fprintf(stderr,"Mem error\n");
2299                                   gmc.duv[0].x= gmc.duv[0].y =
2300                                                    gmc.duv[1].x= gmc.duv[1].y =
2301                                                    gmc.duv[2].x= gmc.duv[2].y = 0;
2302                                            return gmc; }
2303    
2304  // filter mask of all blocks  // filter mask of all blocks
2305    

Legend:
Removed from v.851  
changed lines
  Added in v.872

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