[cvs] / xvidcore / src / motion / motion_est.h Repository:
ViewVC logotype

Diff of /xvidcore/src/motion/motion_est.h

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

revision 1.3.2.5, Tue Apr 8 15:35:52 2003 UTC revision 1.4, Sat Mar 29 10:21:23 2003 UTC
# Line 90  Line 90 
90          (int)(29.6436*NEIGH_TEND_8X8 + 0.5), (int)(36.4949*NEIGH_TEND_8X8 + 0.5)        };          (int)(29.6436*NEIGH_TEND_8X8 + 0.5), (int)(36.4949*NEIGH_TEND_8X8 + 0.5)        };
91    
92  // mv.length table  // mv.length table
93  static const int mvtab[64] = {  static const uint32_t mvtab[33] = {
94                  1, 2, 3, 4, 6, 7, 7, 7,                  1, 2, 3, 4, 6, 7, 7, 7,
95                  9, 9, 9, 10, 10, 10, 10, 10,                  9, 9, 9, 10, 10, 10, 10, 10,
96                  10, 10, 10, 10, 10, 10, 10, 10,                  10, 10, 10, 10, 10, 10, 10, 10,
97                  10, 11, 11, 11, 11, 11, 11, 12,          10, 11, 11, 11, 11, 11, 11, 12, 12
98                  12, 12, 12, 12, 12, 12, 12, 12,  };
                 12, 12, 12, 12, 12, 12, 12, 12,  
                 12, 12, 12, 12, 12, 12, 12, 12, 12 };  
99    
100  static const int DQtab[4] = {  static const int DQtab[4] = {
101          -1, -2, 1, 2          -1, -2, 1, 2
# Line 114  Line 112 
112          VECTOR * currentMV;          VECTOR * currentMV;
113          VECTOR * currentQMV;          VECTOR * currentQMV;
114          int32_t * iMinSAD;          int32_t * iMinSAD;
115          const uint8_t * RefP[6]; // N, V, H, HV, cU, cV          const uint8_t * Ref;
116            const uint8_t * RefH;
117            const uint8_t * RefV;
118            const uint8_t * RefHV;
119            const uint8_t * RefCU;
120            const uint8_t * RefCV;
121          const uint8_t * CurU;          const uint8_t * CurU;
122          const uint8_t * CurV;          const uint8_t * CurV;
123          uint8_t * RefQ;          uint8_t * RefQ;
# Line 128  Line 131 
131          int chroma;          int chroma;
132          int rrv;          int rrv;
133  //fields for interpolate and direct modes  //fields for interpolate and direct modes
134          const uint8_t * b_RefP[6]; // N, V, H, HV, cU, cV          const uint8_t * bRef;
135            const uint8_t * bRefH;
136            const uint8_t * bRefV;
137            const uint8_t * bRefHV;
138            const uint8_t * b_RefCU;
139            const uint8_t * b_RefCV;
140    
141          VECTOR bpredMV;          VECTOR bpredMV;
142          uint32_t bFcode;          uint32_t bFcode;
143  // fields for direct mode  // fields for direct mode
# Line 239  Line 248 
248  #define iDiamondSize 2  #define iDiamondSize 2
249    
250  static __inline uint32_t  static __inline uint32_t
251  MakeGoodMotionFlags(const uint32_t MotionFlags, const uint32_t VopFlags, const uint32_t VolFlags)  MakeGoodMotionFlags(const uint32_t MotionFlags, const uint32_t GlobalFlags)
252  {  {
253          uint32_t Flags = MotionFlags;          uint32_t Flags = MotionFlags;
254    
255          if (!(VopFlags & XVID_VOP_MODEDECISION_BITS))          if (!(GlobalFlags & XVID_MODEDECISION_BITS))
256                  Flags &= ~(XVID_ME_QUARTERPELREFINE16_BITS+XVID_ME_QUARTERPELREFINE8_BITS+XVID_ME_HALFPELREFINE16_BITS+XVID_ME_HALFPELREFINE8_BITS+XVID_ME_EXTSEARCH_BITS);                  Flags &= ~(QUARTERPELREFINE16_BITS+QUARTERPELREFINE8_BITS+HALFPELREFINE16_BITS+HALFPELREFINE8_BITS+EXTSEARCH_BITS);
257    
258          if (Flags & XVID_ME_EXTSEARCH_BITS)          if (Flags & EXTSEARCH_BITS)
259                  Flags |= XVID_ME_HALFPELREFINE16_BITS;                  Flags |= HALFPELREFINE16_BITS;
260    
261          if (Flags & XVID_ME_EXTSEARCH_BITS && MotionFlags & XVID_ME_EXTSEARCH8)          if (Flags & EXTSEARCH_BITS && MotionFlags & PMV_EXTSEARCH8)
262                  Flags |= XVID_ME_HALFPELREFINE8_BITS;                  Flags |= HALFPELREFINE8_BITS;
263    
264          if (Flags & XVID_ME_HALFPELREFINE16_BITS)          if (Flags & HALFPELREFINE16_BITS)
265                  Flags |= XVID_ME_QUARTERPELREFINE16_BITS;                  Flags |= QUARTERPELREFINE16_BITS;
266    
267          if (Flags & XVID_ME_HALFPELREFINE8_BITS) {          if (Flags & HALFPELREFINE8_BITS) {
268                  Flags |= XVID_ME_QUARTERPELREFINE8_BITS;                  Flags |= QUARTERPELREFINE8_BITS;
269                  Flags &= ~XVID_ME_HALFPELREFINE8;                  Flags &= ~PMV_HALFPELREFINE8;
270          }          }
271    
272          if (Flags & XVID_ME_QUARTERPELREFINE8_BITS)          if (Flags & QUARTERPELREFINE8_BITS)
273                  Flags &= ~XVID_ME_QUARTERPELREFINE8;                  Flags &= ~PMV_QUARTERPELREFINE8;
274    
275          if (!(VolFlags & XVID_VOL_QUARTERPEL))          if (!(GlobalFlags & XVID_QUARTERPEL))
276                  Flags &= ~(XVID_ME_QUARTERPELREFINE16+XVID_ME_QUARTERPELREFINE8+XVID_ME_QUARTERPELREFINE16_BITS+XVID_ME_QUARTERPELREFINE8_BITS);                  Flags &= ~(PMV_QUARTERPELREFINE16+PMV_QUARTERPELREFINE8+QUARTERPELREFINE16_BITS+QUARTERPELREFINE8_BITS);
277    
278          if (!(VopFlags & XVID_VOP_HALFPEL))          if (!(GlobalFlags & XVID_HALFPEL))
279                  Flags &= ~(XVID_ME_EXTSEARCH16+XVID_ME_HALFPELREFINE16+XVID_ME_HALFPELREFINE8+XVID_ME_HALFPELREFINE16_BITS+XVID_ME_HALFPELREFINE8_BITS);                  Flags &= ~(PMV_EXTSEARCH16+PMV_HALFPELREFINE16+PMV_HALFPELREFINE8+HALFPELREFINE16_BITS+HALFPELREFINE8_BITS);
280    
281          if ((VopFlags & XVID_VOP_GREYSCALE) || (VopFlags & XVID_VOP_REDUCED))          if (GlobalFlags & (XVID_GREYSCALE + XVID_REDUCED))
282                  Flags &= ~(XVID_ME_CHROMA16 + XVID_ME_CHROMA8);                  Flags &= ~(PMV_CHROMA16 + PMV_CHROMA8);
283    
284          return Flags;          return Flags;
285  }  }

Legend:
Removed from v.1.3.2.5  
changed lines
  Added in v.1.4

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